PMXBOT Log file Viewer

Help | Karma | Search:

#pil logs for Thursday the 23rd of May, 2013

(Back to #pil overview) (Back to channel listing) (Animate logs)
[01:17:37] <Pavlov> cool thanks
[20:27:22] <knicholes> Anyone get why PIL rotates iPad images on a save()? I think it has something to do with exif data, but I haven't learned exactly what that is or how it could be causing this problem.
[20:33:57] <aclark> knicholes: you run PIL on your iPad?
[20:33:59] <aclark> :-)
[20:34:13] <knicholes> alcark: Heh-- I upload a photo from my iPad to my server.
[20:34:53] <knicholes> Normal photos don't need to be rotated, but iPad photos do for some reason.
[20:35:18] <knicholes> I'm installing something called exiv2 right now, then Ill install the python wrapper to it. I think that will give me human-readable access to the exif data.
[20:35:50] <aclark> knicholes: ah, yeah no idea unfortunately
[21:14:34] <wiredfool> Ah. I bet it's this: https://github.com/python-imaging/Pillow/issues/183
[21:19:21] <knicholes> wiredfool: nice
[21:20:35] <wiredfool> I suspect if you just read the exif and add it in the save call, it will work
[21:20:50] <wiredfool> There's some code that does things like that in the jpeg tests.
[22:38:10] <knicholes> wiredfool: I pull out the exif data and check if there is a '3' in the 'Orientation' exif tag-- if so, I just automatically rotate by 180.
[22:39:00] <wiredfool> that's certainly one option
[22:39:39] <wiredfool> alternately you can make sure that your exif includes the original orientation flag, and (hopefully) most everyone reads it correctly
[22:40:26] <wiredfool> Though if you're pullin in PIL already, you're probably doing enough manipulation that fixing the orientation isn't an issue
[22:40:38] <knicholes> Right
[22:40:43] <knicholes> I'm cropping and resizing as well
[22:41:34] <wiredfool> so, one more rotation is nothing big