Generate Bytecode to image

Hi,
i have one bytecode string and want to generate image according to the bytedcode, bytecode string is so long and this is working in the html. can u give me some idea how we can change bytecode to image in AS2

Thanks
Manoj