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
when doing a rotate().extract() on a image that origins from iOS and got rotated the extract function does not honour the attempted orientation fix that should happen calling the rotate() function but results in a bad extraction area error.
What is the expected behaviour?
the extract function should honour the rotation fix for iOS pictures that stored their rotations within their metadata.
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Both code samples take a 4032 wide x 3024 high landscape image as input, auto-orient it by rotating 90 degrees to create a 3024 wide x 4032 high portrait image, then correctly fail to extract an image with a width of 3583 pixels from an image of 3024 pixels wide.
oh, you are right, I was looking for the problem at the wrong point...
Just for context:
We are actually getting the extraction areas as percentages and need to do the area calculation ourselves. Therefore we first do a rotate(), then are fetching metadata() and do the calculation of the extract area regarding to the fetched metadata.
We did not take to account that the sharpStream.metadata() function still returns the original width and height with orientation set - we are trying to extract something that is not there..
Thank you for your input!
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.If you cannot confirm both of these, please open an installation issue instead.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?What are the steps to reproduce?
when doing a
rotate().extract()
on a image that origins from iOS and got rotated the extract function does not honour the attempted orientation fix that should happen calling therotate()
function but results in a bad extraction area error.What is the expected behaviour?
the extract function should honour the rotation fix for iOS pictures that stored their rotations within their metadata.
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
where the rotation and extraction done separate work as expected:
Please provide sample image(s) that help explain this problem
the image provided within #4059 shows this behaviour.
Also https://assets-tt-com.nmo.at/im-content/images/3b6073d7-d32f-53a2-8c09-544729a6d408
the following one needs a narrower extract area:
{ width: 1583, height: 1116, left: 287, top: 575 }
https://assets-tt-com-events.production.tt.nmo.at/914aeac27bd6583117a06cf88c80096bca64fd38_Leob_hne_-_Schick_mir_keine_Blumen_-_Hochformat.jpeg
The text was updated successfully, but these errors were encountered: