Sunday, July 27, 2014

the joy of exif

This is just a rant. I hope to do a followup post once I fix the damn problem.

Man, EXIF and iOS and browsers == bad, bad news.

So, iOS doesn't bother to actually rotate a JPG when it stores it in memory, just notes which way the camera was held in the EXIF metadata, and sophisticated display programs do the right thing to show you your image right way up. Fair enough, I guess, rotating big chunks of memory is hard work for a device.

BUT -- Chrome Safari and Firefox ignore the EXIF when it's a jpg in an img tag, so the images appear at all kinds of random orientations, but then they respect it when you open up the image by itself in a tab. (!!!) IE just always ignores it. So points for consistency for IE. if you want to see this wonderous magic for yourself.

I was all psyched about my this drag and drop image upload library I found ( ) but now I have to figure out how to get ImageMagick to fix this crap before I can enjoy the fruits of my labor. This is really horrendous.

UPDATE: an uncool and limited but dead simple and effective for my needs solution is to open up the iOS image in OSX Preview and hit cmd-S for Save. The resulting file I can then drag right into my dropzone.js-based UI.

BETTER UPDATE: the secret is to use imagemagick's mogrify -auto-orient command - see this blog post for more.

No comments:

Post a Comment