Skip to content
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

Enable autorotate for image previews #21

Merged
merged 1 commit into from May 10, 2018

Conversation

Projects
None yet
4 participants
@nd0ut
Copy link
Contributor

commented May 4, 2018

Our widget appends following modifiers to each img.src

'-/preview/1162x693/-/setfill/ffffff/-/format/jpeg/-/progressive/yes/'

It autorotates images so widget have no problems with exif-orientated images.

Effects Tab also appends this modifiers, but only for preview, not for crop and not for imageChange event. As result, the image get suddenly rotated after crop started.

@nd0ut nd0ut requested review from bautrukevich and Zmoki May 4, 2018

@homm

This comment has been minimized.

Copy link

commented May 5, 2018

Any image operation (doesn't matter, preview or crop) applies the correct orientation to the image. I don't understand how it's possible: "As result, the image get suddenly rotated after crop started."

@nd0ut

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2018

@homm that is not true.

For example, here is portrait image with landscape orientation: https://github.com/recurser/exif-orientation-examples/blob/master/Portrait_5.jpg

GitHub shows the image with orientation applied. Widget shows it without orientation applied. Moreover, our media processing API removes exif tags.

https://ucarecdn.com/481cc7b4-95db-4320-99a5-8bc3d292ca40/ - raw image with exif
https://ucarecdn.com/481cc7b4-95db-4320-99a5-8bc3d292ca40/-/crop/1200x1011/0,0/ - cropped image without exif

Also we have video with this bug represented: https://www.youtube.com/watch?v=v1K_xLvKJZs

@nd0ut

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2018

@homm oh, I noticed that we have autorotate option enabled by default. But it seems not working.

@homm

This comment has been minimized.

Copy link

commented May 5, 2018

https://ucarecdn.com/481cc7b4-95db-4320-99a5-8bc3d292ca40/ - raw image with exif

So this is the root of the problem. You shouldn't ever show raw images anywhere on the page.

@nd0ut

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2018

@homm yep, that's exactly the way it was made. This PR fixes it.

@nd0ut nd0ut changed the title Ignore EXIF for image previews Enable autorotate for image previews May 5, 2018

@Zmoki

Zmoki approved these changes May 10, 2018

@nd0ut nd0ut merged commit 62ae1be into master May 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.