On Fri, 29 Feb 2008 7:07:40 am Fredrik Lundh wrote: > PIL doesn't create resolution tags by itself, so unless you add it > yourself, or roundtrip an existing TIFF file, the file shouldn't contain > any resolution tags at all. > > if the former, it would help if you could post the code you're using to > set the tags.
I'm not setting any tags. I'm capturing an image through OpenCV (web cam),
using opencv.adaptors.Ipl2PIL() to get a PIL image. That one is just written
out using myImage.save('foo.tif')
> if the latter, please post the contents of im.tags.items(), just before
> you save the file. e.g.
>
> print im.tags.items()
> im.save("out.tif")
In [6]: myImage.tag.items()
Out[6]:
[(256, (640,)),
(257, (480,)),
(258, (8, 8, 8)),
(259, (1,)),
(262, (2,)),
(273, (128,)),
(278, (480,)),
(277, (3,)),
(279, (921600,))]
Hopefully that's enlightening to you. It surely isn't to me ... :)
Unfortunately I couldn't find any documentation on the "tag" attribute at
http://www.pythonware.com/library/pil/handbook/image.htm
> > To me this very much sounds like an issue with uninitialised
> > variables
> > in some structures
>
> There's really no such thing as an uninitalized variable in Python...
No, but I assume that PIL is implemented in C/C++ behind the scenes, and it's
accessed through a wrapper. And in C it is very well possible and a common
mistake. Just look at what students here are cooking up and you know what I
mean ... :-/
HTH,
Guy
--
Guy K. Kloss
Institute of Information and Mathematical Sciences
Te Kura Putaiao o Mohiohio me Pangarau
Room 2.63, Quad Block A Building
Massey University, Auckland, Albany
Private Bag 102 904, North Shore Mail Centre
voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181
eMail: [EMAIL PROTECTED] http://iims.massey.ac.nz
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
