You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Load an image with an EXIF orientation tag such as 4, 5 or 7
Call .rotate() on the pipeline
Output the image using toFile()
Observe the lack of auto-rotation
What is the expected behaviour?
The images should be automatically rotated based on their exif orientation tag.
(According to the documentation; Rotate the output image by either an explicit angle or auto-orient based on the EXIF Orientation tag.)
All of these images have an exif orientation, but are not automatically oriented. If you add a resize(200, 200) call to the pipeline, it will however rotate them correctly.
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Possible bug
Is this a possible bug in a feature of sharp, unrelated to installation?
npm install sharp
completes without error.node -e "require('sharp')"
completes without error.Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?What are the steps to reproduce?
.rotate()
on the pipelinetoFile()
What is the expected behaviour?
The images should be automatically rotated based on their exif orientation tag.
(According to the documentation; Rotate the output image by either an explicit angle or auto-orient based on the EXIF Orientation tag.)
All of these images have an exif orientation, but are not automatically oriented. If you add a
resize(200, 200)
call to the pipeline, it will however rotate them correctly.Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Download source images from here: https://timely-scone-c18287.netlify.app/images.zip
(They are also available as https://timely-scone-c18287.netlify.app/input-orientation1.jpg through 8)
Please provide sample image(s) that help explain this problem
(provided as links in order for GitHub not to alter image and adjust any exif data)
https://timely-scone-c18287.netlify.app/input-orientation4.jpg
https://timely-scone-c18287.netlify.app/input-orientation5.jpg
https://timely-scone-c18287.netlify.app/input-orientation7.jpg
The text was updated successfully, but these errors were encountered: