Open laurivosandi opened 8 years ago
Hey @laurivosandi! It's been a while you reported this issue but I couldn't understand it. I might start to comprehend your point here. Probably you've been over it, but your knowledge may be useful here.
Do you think this issue on Neomad and this one from the Medium Editor Plugin could be also for the same reason?
Hi, yes this looks exactly like the same issue
The point is JPEG data orientation doesn't have to match the orientation it is supposed to be shown in. EXIF tags show you the intended orientation.
Some hint based on the current library used in Imagefit: https://stackoverflow.com/a/6218425/328117 This seems simple enough to be implemented.
Wondering if we should reorient the picture or just pass EXIF metadata. I was working on the first option, but second might make more sense as it preserves a little more the original data.
Any opinion @laurivosandi ?
Hi,
it seems JPEG images with EXIF rotation info are messed up after resizing. This can be easily fixed by rotating the image after resizing based on the information found in EXIF tags:
Also to speed up resizing/rotation you could take a look at epeg at https://github.com/mattes/epeg