Listers,

I have a very simple script that rotates images using PIL. After running, the output images are about 1/3 the file size of the input image. The file attributes indicate they have increased in resolution from 72 to 96 ppi but have the same radiometric depth. Does the PIL rotate method apply a hidden resampling? Why are the output images so much smaller?

from PIL import Image
import glob, os

indir = r'C:\Users\Me\Pictures\export'
for infile in glob.glob(indir + '\\' + "*.jpg"):
    print infile
    file, ext = os.path.splitext(infile)
    im = Image.open(infile)
    im2 = im.rotate(270)
    im2.save(file +"_rotate.jpg", "JPEG")
   #  os.remove(infile)

<<attachment: terrafergus.vcf>>

_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to