I'm pasting a few images onto a canvas, resizing them, and saving the canvas in 300 dpi. The idea that even though I'm resizing those pictures, I'd like to preserve as much of their data as possible. In other words I'd like them to be very high quality.
I'm not sure I'm doing this correctly, however. I think I'm losing a lot of quality in the resizing stage. Can anyone see room for improvement in my code? If it matters, the pictures that I'm pasting in are from a digital camera. Here's the stripped down relevant bits: import Image canvas = Image.new("RGBA", (1800, 1200), "black" ) # 6"x4" printed im1 = Image.open("test1.jpg").convert('RGBA') # this would be larger than 3000 pixels wide, very large im1 = im1.resize ( (800, 600) ) canvas.paste(im1, (0, 0), im1 ) im2 = Image.open("test2.jpg").convert('RGBA') im2 = im2.resize ( (800, 600) ) canvas.paste(im2, (900, 0), im2 ) canvas.save("output.jpg", quality=100, dpi = (300, 300))
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig