Page 1 of 1
Picture in Portrait Mode is Automatically Landscaped
Posted: Wed Mar 22, 2017 2:20 am
by fsw
Strangely enough pictures that have a bigger height than width are automatically rotated to landscape format.
Totally unusable.
When a picture is loaded with LoadImage it's rotated, when the same jpg picture is loaded with the WebGadget the orientation is preserved.
Automatic rotation of an image is bad.
Re: Picture in Portrait Mode is Automatically Landscaped
Posted: Wed Mar 22, 2017 3:15 am
by kenmo
I would 99% guess that the image file is actually landscape - probably from a phone or camera?
The WebGadget and other viewing software are probably auto-rotating it based on EXIF metadata.
Maybe there should be a flag request for LoadImage() to handle EXIF rotation data, but in the meantime somebody here can probably point you to some EXIF handling code.
Re: Picture in Portrait Mode is Automatically Landscaped
Posted: Sun Apr 09, 2017 8:32 am
by fsw
@kenmo
Sorry for the late reply.
I think you are right it's a picture from a camera and the EXIF information is in there.
And EXIF has 8 modes of orientation
I'm sure LoadImage does not look into EXIF meta data...
Thank you for your hint.
ADMIN
Please move this to the "normal" macOS section.
(not bugs...)
Re: Picture in Portrait Mode is Automatically Landscaped
Posted: Sun Apr 09, 2017 9:12 am
by wilbert
It's indeed related to exif orientation.
You could use OSX API instead to load the image.