-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Version 0.25.4
Images taken on iOS in portrait orientation get rotated by .resize. It doesn't matter if the image is taken directly from the camera roll or imported from the device or if the image is re-encoded by sending it via text or email. The first two images attached were retrieved with "Image Capture" app and the third was sent via email. The last three images are the output.
What are the steps to reproduce? Load one of the images attached to this bug into a Buffer then
sharp(buf).resize(256, 256).toBuffer(...
Then write that out to a file, then view that file and notice the image was not only resized, it is also rotated 270°
What is the expected behaviour?
No rotation
What is the output of running npx envinfo --binaries --system?
$ npx envinfo --binaries --system
npx: installed 1 in 1.087s
System:
OS: macOS 10.15.2
CPU: (6) x64 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
Memory: 56.79 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.17.0 - /usr/local/bin/node
npm: 6.14.4 - /usr/local/bin/npm
though this happens running on Linux as well.



