Rodrigo schrieb:
I ended up editing it to this... however I have the hex code showing in
text, Basically it should be a binary file in the end, not a text file -
apologies for the confusion.  Perhaps the original that you wrote Karsten
did that, however it was outputting to the screen and not a file.

No, that's exactly what I intended it to do since you wrote something about text files and HTML color codes. Seems what you really want is:

from PIL import Image

if __name__=="__main__":
        im = Image.open("image.png")
        out = file('image.raw', 'w')
        out.write(im.tostring())
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to