[Lazarus] TImage shows loaded image rotated by 90?

Marc Weustink marc at dommelstein.nl
Fri Sep 23 15:46:11 CEST 2016


LacaK wrote:
> Dňa 23.9.2016 o 14:47 Marc Weustink napísal(a):
>> LacaK wrote:
>>> Hi,
>>>
>>> I have JPEG image with width=2448 and height=3264.
>>
>> No
>>
>>> All programs in Windows show image with respect to his dimensions, so
>>> shorter is X and higher is Y.
>>>
>>> But when I load this image into TImage control (using Picture property)
>>> image is shown rotated by 90 degrees, with width=3264 and height=2448
>>
>> That is correct. If you look at the exif info, you read:
>
> How do you read this Exif info ?

with a decent viewer ;) (in windows I use irfanview)

> When I right click image and look at Details tab I see there only
> width=2448 and height=3264

I see too

> But when I use on-line exif viewer (at http://regex.info/exif.cgi) there
> are swaped results and:
> OrientationRotate = 90 CW
>
> So it seems, that you are right ;-)
>
> Next question then is: how can I detect this in Lazarus and do same as
> "smart viewers" do ?
> (in other words: is there and component, which allows me read this EXIF
> information from JPEG image ?)

Google ?

Exif + Delphi -> torry.net -> NativeJpg v.1.33 or TExif v.1.3 or 
TGJPGCommentInfoP v.1.0

(looking for sources supporting D7)

you may try that.

Marc




More information about the Lazarus mailing list