[Image-SIG] PIL 1.1.5 - Loss of resolution
kevin@cazabon.com
kevin at cazabon.com
Sat Aug 27 12:46:47 CEST 2005
When you rotate an image, you're not modifying the image in place - the result is a new image, which unfortunately doesn't carry the format data from the original.
You can simply copy the data over yourself from the original, or supply the dpi setting to the TIFF module when saving (it's supported now).
Kevin.
----- Original Message -----
From: Tim Ake
To: image-sig at python.org
Sent: Monday, June 27, 2005 11:31 PM
Subject: [Image-SIG] PIL 1.1.5 - Loss of resolution
Hi,
I am using PIL 1.1.5 with Python 2.4, and am seeing a loss of resolution when dealing with images. I open an image that is 200 dpi, do a rotate, and save the rotated image. What I'm seeing is that the rotated image is saved at the same size, but is at 100 dpi instead of 200 dpi. My code frament is as follows:
# open the tif file image
im = Image.open(strFile)
# rotate the image 90 degrees CCW
om = im.rotate(90)
# save the image as a.tif
om.save("a.tif", "TIFF") #save the rotated file
I can't afford a loss of resolution - any thoughts on maintaining my original resolution?
Thanks!
Tim Ake
335 Old Hickory Rd.
Woodstock, GA 30188
mailto:tim at timake.com
http://www.timake.com
(770) 928-2433 (phone)
(404) 944-4890 (cell)
soli deo gloria
------------------------------------------------------------------------------
_______________________________________________
Image-SIG maillist - Image-SIG at python.org
http://mail.python.org/mailman/listinfo/image-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20050827/5db117a2/attachment.htm
More information about the Image-SIG
mailing list