Image is being rotated and not correctly resizes on MacOS/Macbook M1
Closed this issue · 7 comments
Description:
Describe the bug
When executing rimage -q 75 --width 1300 --height 600 -o ./output -s _updated sample-1.jpg
command with both --width
and --height
-- it rotates the image 90 deg clockwise and then applies 1300 x 600 size but the image width now becomes the height so it appears squeezed. (See sample-1.jpg below).
If I specify just --width
: rimage -q 75 --width 1300 -o ./output -s _updated sample-2.jpg
-- it rotates the image 90 deg clockwise and then applies correctly 1300 width. (See sample-2.jpg below).
If I specify just --height
-- then it rotes it 90 deg clockwise and is applies height to the with of the original image making image 276 x 600 px. (See sample-3.jpg)
Steps To Reproduce:
Steps to reproduce the behavior:
-
Run command(s):
1.1.rimage -q 75 --width 1300 --height 600 -o ./output -s _updated sample-1.jpg
1.2rimage -q 75 --width 1300 -o ./output -s _updated sample-2.jpg
1.3rimage -q 75 --height 600 -o ./output -s _updated sample-3.jpg
-
See resultant images.
Expected behavior:
Should not rotate or squeeze image.
Images
Additional info:
Desktop (please complete the following information):
- OS: MacOS 12.6.8
- Version: 0.8.2
After some research I found the source of the problem: your image has an EXIF orientation header that is not being processed correctly. More information here - https://magnushoff.com/articles/jpeg-orientation/
Started working on this issue.
I suspected that it might have something to do with EXIF data in my images. So it would be wonderful if you could implement auto-orientation capability.
Thank you so much for being so responsive.
Hi Vlad,
Any updates on this issue? Did you make any progress?
Thanks.
Yes, I have fixed this issue in new library, now I struggle with binary to work properly. In new release this problem should be fixed
Okay, looking forward for the new release then. Thank you.
New release has been out, please check for this issue again
Close this issue as resolved in version 0.9.0