|
List Info
Thread: problems setting DPI in TIFF files
|
|
| problems setting DPI in TIFF files |

|
2006-10-09 23:35:06 |
|
Hello,
I'm generating some TIFF files using the PIL. These files then get sent to another applicaion which prints them. I have been told that there is a field in TIFF files which sets the image resolution. The documentation for
1.1.5 states that:
"
The open method sets the following info properties:
- compression
Compression mode. - dpi
(1.1.5) Image resolution as an (xdpi, ydpi) tuple, where
applicable. You can use the tag attribute to get more
detailed information about the image resolution. - "
I downloaded and cmpiled 1.1.5, but these attributes do not show up. Here's an example:
>>> import Image >>> im = Image.open
('Bishop_Bob.tiff') >>> im.dpi Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: TiffImageFile instance has no attribute 'dpi'
I tried using the "
im.tag" attribute, but I cannot work out what tag number I should be looking at. In any case, none of the tags present contain the value of 72, which seems to be the default resolution of the image.
I hope someone out there can help, I've been trying to crack this problem for a few days now.
Thanks,
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|