ImageResizer rotation issues

筅森魡賤 提交于 2020-01-03 19:07:07

问题


I rotated a few images on my computer, however, image resizer keeps using the old orientation. When I navigate to the image just using the image path, it shows up fine. However, when I add ?h=400, it's using the old orientation. What's causing this?


回答1:


The application you are using to rotate images is only setting the Exif Orientation metadata flag. ImageResizer will honor aforementioned metadata if you install the Autorotate plugin and specify &autorotate=true in the command string.

Browser and mail reader support for Exif Orientation is extremely spotty; I'm surprised your browser actually rotated the image.

Keep in mind that rotation is somewhat expensive; it's good to have your images actually rotated ahead of time, as it will make images render consistently and a bit faster (especially on mobile or slow connections).

ImageResizer does not output the exif orientation flag, it always produces a true rotated image.




回答2:


ImageResizer is now able to rotate without the plugin. Just add &autorotate=true to the URL.

See: https://imageresizing.net/docs/v4/reference



来源:https://stackoverflow.com/questions/25631063/imageresizer-rotation-issues

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!