Preserve EXIF image orientation
netopolit opened this issue · comments
EXIF image orientation data appears to be lost on resize/compress. This causes incorrect display of the image. It would be great if there was an option to preserve EXIF data.
Thanks for this useful module.
Maybe this answer can be used:
http://stackoverflow.com/questions/7584794/accessing-jpeg-exif-rotation-data-in-javascript-on-the-client-side
Hey guys. Thanks for reporting this issue. I have asked @cstefanache for permission to use his rewrite of exif-js (https://github.com/exif-js/exif-js): https://github.com/cstefanache/angular2-img-cropper/blob/master/src/exif.ts
I think that in combination with https://github.com/blueimp/JavaScript-Load-Image/blob/master/js/load-image-orientation.js#L68 would be the best way to deal with this...
Sorry for the delay guys @cobisimo @netopolit , I was quite busy the last few weeks.
Version 2.1.0 https://github.com/bergben/ng2-img-max/releases/tag/2.1.0 fixes this issue.
I have also added a method that rotates / flips any image according to its EXIF data: https://github.com/bergben/ng2-img-max#get-exif-oriented-image
@bergben Thanks a lot, it was quick enough.
@bergben Thank you :).
Please make sure to update to 2.1.1 to preserve the EXIF data for resizing. I had forgotten to update ng2-pica according to the changes to preserve EXIF data aswell. Sorry for the inconvenience guys!