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
Jimp.read() should autorotate images basing on their EXIF data. This feature does not work properly in @jimp/custom. Whereas it is understandable that this feature may require some plugins, it is not documented which ones are actually needed.
Current Behavior
Works correctly for orientations 1 (no action), 2, and 4 (ones which only require mirroring). For remaining orientations (which require rotating), images have incorrect dimensions, and their bitmaps are empty (all bytes are zeros).
Note 1: I am using @jimp/custom with flip and rotate plugins and all available types (@jimp/types). In my understanding of exifRotate() function, this should be enough, but is not:
Expected Behavior
Jimp.read()
should autorotate images basing on their EXIF data. This feature does not work properly in@jimp/custom
. Whereas it is understandable that this feature may require some plugins, it is not documented which ones are actually needed.Current Behavior
Works correctly for orientations 1 (no action), 2, and 4 (ones which only require mirroring). For remaining orientations (which require rotating), images have incorrect dimensions, and their bitmaps are empty (all bytes are zeros).
Failure Information (for bugs)
Steps to Reproduce
Consider
testexif.js
script in this gist: https://gist.github.com/skalee/7dc467bf1f097e5b719e05c2ce877251. It is a Node.js script, which should be executed in a directory containing theseLandscape_*.jpg
pictures: https://github.com/oliver-moran/jimp/tree/master/packages/jimp/test/images/exif-orientation.Context
Note 1: I am using
@jimp/custom
withflip
androtate
plugins and all available types (@jimp/types
). In my understanding ofexifRotate()
function, this should be enough, but is not:https://github.com/oliver-moran/jimp/blob/44ce60b5cc53ee60cd5c63d4dc0ecf26fd3d431e/packages/core/src/utils/image-bitmap.js#L31-L63
Note 2: Switching to full-blown
jimp
works the issue arround.Failure Logs
See gist.
Additional notes
This may be a bug in the rotate plugin — perhaps it has some unspecified dependencies.
The text was updated successfully, but these errors were encountered: