stomita/ios-imagefile-megapixel

why some image be rotated 90 degrees

Closed this issue · 6 comments

rlog commented

RT

Because it doesn't read EXIF information in the JPEG file.
Use exif.js (https://github.com/jseidelin/exif-js) to extract the rotation orientation info from JPEG file, and bring it back by passing option parameter "orientation" in render function.

Hello,
Thanks @stomita for the great solution.
@rlog I've developed a jQuery plugin working with exif.js you can check it https://github.com/gokercebeci/canvasResize
It could solve your problem.

@gokercebeci That's an excellent plugin!

But would be even better if it wasn't distributed as a jQuery plugin, and from what I can see jQuery isn't used for anything critical. It would be much more useful if it was simply a class/function, similar to moment.js or stomita's MegaPixImage, since it could be used standalone, with Zepto.js or another library.

thanks for your advice @sandstrom. I'll start to work on this next week.

It's done @sandstrom, please, check it out!

@gokercebeci Wonderful! I'll check it out right away!