-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thumbsup added unecessary rotation? #317
Comments
Hi! Thanks for reporting this. Today, Thumbsup applies a rotation because it strips the EXIF data from the resized images. This is both for privacy reasons, and because not all bowsers used to render rotation properly. In the EXIF info you posted, there is a 90CW rotation, so that's what being applied to compensate for the loss of metadata. Does the result not look like you expect? There is a new feature about to land that allows you to preserve EXIF data, in which case it doesn't apply rotations. |
Thanks. So, the image looks correct in the Finder and Preview (on Mac) and in fact I suspect that the image was rotated to this position using the rotate feature of the quick-view in Finder. However after gm generates the thumbnail it appears incorrect (with an extra clockwise 90degree rotation). What you are saying (about stripping the exif and baking in the rotation) makes sense... not sure what's up. I'll do some experiments and see if I can tell where things are going wrong. |
Ok, I think the problem is that the exif information is not being stripped from the galleria media. I still see it (including the rotation) in the generated thumbnail image. For reference I installed thumbsup via npm (per instructions) yesterday, grabbing the latest GraphicsMagick with brew. Maybe it no longer strips the exif? (I'll take a look). EDIT: It looks like gm would need a --strip option in order to remove the exif data but I don't see this in the trace. |
Here is an example photo that you can use to test: https://pat.net/misc/IMG_1712.jpeg . This photo (the person anyway, ignore the border) gets rendered to a thumbnail rotated an additional 90 degrees. |
@patniemeyer Thank you so much for your findings! Just faced a similar problem, and your posts saved me so much time investigating it. I resolved it by just adding |
Thanks, I was not aware of the |
Hi @patniemeyer and @tpimh. Thanks again for finding this bug. Indeed, the latest version of GM no longer strips EXIF info when using It’s now fixed in the latest version published on npm (2.17.1). |
I'm noticing that some jpeg files are having an unexpected rotation applied. I can see this in the log trace where gm is being called with a 90 degree rotation:
gm "convert" "-quality" "90" "photos/IMG_1712.jpeg" "-rotate" "90" "-page" "+0+0" "-resize" "x1000>"
The original photo exif info is here (in this gist): https://gist.github.com/patniemeyer/efdc706a12b2671696d68392eb05898d
I had guessed that this had something to do with these files being transferred from iPhone and maybe converted from HEIF along the way. But why would Thumbsup be running gm with a rotation explicitly?
Thanks for you work... thumbsup is great.
The text was updated successfully, but these errors were encountered: