Hello Everyone!
I am attempting to save a PNG file, where the source file doesn't have dpi 
fields.
What is the proper way to enforce a new DPI with .save() function?

I have attempted to modify the .info dictionary by adding a dpi entry, but it 
never gets saved for some reason.
I am missing something really obvious here. :)

import Image
print "Loading Demo.png"
im = Image.open("C:\\Demo.png")
print "Demo.png Info:\n"
print im.info
print "________________________"
print "Changing Demo.png dpi to 72"
im.info["dpi"]=(72,72)
print "________________________"
print "Demo.png Info:\n"
print im.info
im.save("C:\\Demo_dpi.png")


Thanks for your help.
Dave.
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to