[Lazarus] TImage shows loaded image rotated by 90?

LacaK lacak at zoznam.sk
Fri Sep 23 15:01:10 CEST 2016


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 ?
When I right click image and look at Details tab I see there only 
width=2448 and height=3264

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 ?)

Thanks
-Laco.

>
> Filename - 6.jpg
> ...
> ImageWidth - 3264
> ImageLength - 2448
> ...
> ExifImageWidth - 3264
> ExifImageHeight - 2448
> ...
> Orientation - Right top
>
> What you see is the result of "smart" image viewers, which read the 
> exif info and read that you held the camera sideways and there fore 
> rotate the image.
> the image istself is still 3264x2448
>
>
> Marc
>
>


More information about the Lazarus mailing list