PMXBOT Log file Viewer

Help | Karma | Search:

#pil logs for Wednesday the 26th of March, 2014

(Back to #pil overview) (Back to channel listing) (Animate logs)
[17:35:15] <edsu> hi all, i'm reading in a tiff and saving a jpeg, and it looks like the jpeg is getting rotated
[17:35:34] <edsu> it looks like the tiff may have orientation metadata which might not be preserved in the jpeg?
[17:36:18] <edsu> i've got an example here: https://gist.github.com/edsu/9788858
[17:36:26] <edsu> if anyone has time to sanity check
[17:38:12] <wiredfool> It's likely.
[17:38:34] <wiredfool> or rather, it's not included by default
[17:40:37] <wiredfool> try: i.save('i.jpg', exif=i.info['exif']
[17:42:46] <edsu> wiredfool: thnx, will try
[17:44:24] <edsu> i.info['exif'] gives me a key error 'exif'
[17:44:33] <wiredfool> ah.
[17:44:44] <edsu> i guess because i is from a tiff?
[17:45:02] <edsu> i see some tags in i.tag.keys()
[17:45:11] <edsu> [256, 257, 258, 259, 262, 34377, 273, 34675, 277, 278, 279, 33723, 700]
[17:45:21] <wiredfool> yeah.
[17:45:29] <wiredfool> those are defined in TiffTage.py
[17:45:36] <wiredfool> (and the spec)
[17:46:01] <edsu> maybe one of them is the orientation i guess?
[17:46:06] <wiredfool> no
[17:46:11] <wiredfool> one of them is the exif tag
[17:46:19] <edsu> oh!
[17:46:22] <wiredfool> and in that is another tiff image directory structure
[17:46:29] <wiredfool> which has an orientation tag.
[17:46:32] <wiredfool> Probably
[17:46:40] <edsu> eek
[17:46:56] <wiredfool> exif is a valid tiff file, stuffed into some other file
[17:47:12] <edsu> oh, right
[17:47:36] <wiredfool> oh, wait, it looks like it's in 274
[17:47:59] <wiredfool> which you don't have
[17:55:47] <wiredfool> Imagemagick says it has an orientation, pillow doesn't see one.
[17:56:20] <wiredfool> exif as well
[17:59:49] <edsu> weird
[18:16:11] <edsu> well, i appreciate you taking a look
[18:16:31] <edsu> in this case it's actually a good thing that the metadata was stripped in the tiff -> jpeg conversion
[18:17:16] <edsu> i work at loc.gov and we had a new digitization vendor who were rotating some images manually, and their software was just setting the metadata rather than converting the image
[18:17:43] <edsu> which is problematic for downstream applications that create derivatives which don't preserve the metadata :)
[18:17:59] <edsu> at least that's the current thinking ...
[18:18:02] <edsu> we'll see
[18:19:03] <wiredfool> hmm
[18:19:17] <wiredfool> looking at the metadata, it was a nice camera that took the image
[18:19:47] <wiredfool> I can take a look further to see if pillow is missing something, but It's going to have to get put in a queue
[18:33:17] <edsu> wiredfool: no worries, i'll file a ticket it if we need do something, fortunately i think the fact that metadata wasn't preserved was a feature in this case
[18:35:26] <wiredfool> ok. features are good. I'm still interested from a WTH point of view. but my desire to dive back into that code is low.
[18:37:21] <edsu> :)
[19:19:53] <travis-ci> [travis-ci] wiredfool/Pillow#260 (travis-tweaks - 7e80ce9 : wiredfool): The build passed.
[19:19:53] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/9e5d597b4d7d...7e80ce9ce049
[19:19:53] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21617758
[20:28:38] <travis-ci> [travis-ci] wiredfool/Pillow#261 (travis-tweaks - d4ecef3 : wiredfool): The build passed.
[20:28:38] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/7e80ce9ce049...d4ecef390fc2
[20:28:38] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21622282
[20:44:39] <travis-ci> [travis-ci] wiredfool/Pillow#262 (travis-tweaks - 55ea6c0 : wiredfool): The build has errored.
[20:44:39] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/d4ecef390fc2...55ea6c01b197
[20:44:39] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21623748
[20:57:41] <travis-ci> [travis-ci] wiredfool/Pillow#263 (jpeg2000 - f30dfef : wiredfool): The build has errored.
[20:57:41] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/dfe6fff10f5d...f30dfefbd88a
[20:57:41] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21624439
[21:08:56] <travis-ci> [travis-ci] wiredfool/Pillow#264 (travis-tweaks - b91326b : wiredfool): The build has errored.
[21:08:56] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/55ea6c01b197...b91326b19505
[21:08:56] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21624787
[21:19:59] <travis-ci> [travis-ci] wiredfool/Pillow#265 (jpeg2000 - 007bcc8 : wiredfool): The build has errored.
[21:19:59] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/f30dfefbd88a...007bcc89ba94
[21:19:59] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21625107
[21:35:34] <travis-ci> [travis-ci] wiredfool/Pillow#266 (jpeg2000 - fd83f5e : wiredfool): The build failed.
[21:35:34] <travis-ci> [travis-ci] Change view : https://github.com/wiredfool/Pillow/compare/007bcc89ba94...fd83f5e4f387
[21:35:34] <travis-ci> [travis-ci] Build details : http://travis-ci.org/wiredfool/Pillow/builds/21626562