ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnFolderMView and TImageEnView adjust orientation
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

imageorganizernx

Australia
14 Posts

Posted - Jun 13 2023 :  05:44:55  Show Profile  Reply
Using IE 12. I have these two components connected together. In FormCreate I do the code below, but still neither of the two components display images with adjusted orientation; so portraits are displayed in landscape orientation. Windows explorer displays portraits correctly.

What am I missing?

ImageEnFolderMView1.EnableAdjustOrientation := True;
ImageEnView1.IO.Params.EnableAdjustOrientation := True;


Image Organizer NX

xequte

38683 Posts

Posted - Jun 13 2023 :  11:35:29  Show Profile  Reply
Hi

Those options use the camera EXIF data to detect the orientation of the image (which must be added by the camera or phone). Windows Explorer should be using the same method, so I cannot see why you would get a different result.

Can you please post or email me some sample images that exhibit this?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

imageorganizernx

Australia
14 Posts

Posted - Jun 13 2023 :  17:06:15  Show Profile  Reply
Here's one example:

attach/imageorganizernx/2023613165119_20150426_153110.jpg

(The "ImageEn Explorer Demo" is also not displaying correct orientation btw)

Image Organizer NX
Go to Top of Page

xequte

38683 Posts

Posted - Jun 14 2023 :  02:46:07  Show Profile  Reply
Hi

This image has been already rotated and the EXIF data was not updated to by the application to show that the EXIF data is now correct, so ImageEn is trying to rotate it how the EXIF data says it should be rotated. You should reset the EXIF orientation data for the image.

Potentially we could add an option to skip auto-orientation for portrait images (on the assumption that they probably have already been rotated and have invalid EXIF data).

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

imageorganizernx

Australia
14 Posts

Posted - Jun 14 2023 :  05:41:43  Show Profile  Reply
I'm sorry, I'm not overly familiar with EXIF and rotation, so there is probably an option somewhere I'm missing.

I've now set the "ImageEn Explorer Demo" and my own simple program using the ImageEn components to view a folder full of images taken by a Samsung S22 Ultra, and the same thing happens with those images. With ImageEn, every single portrait orientation picture is shown rotated. In Windows explorer, they display as portraits.

Using the ImageEn components and properties, is there a simple way to display images in the orientation they do in Windows Explorer?

Image Organizer NX
Go to Top of Page

xequte

38683 Posts

Posted - Jun 15 2023 :  06:47:56  Show Profile  Reply
Hi

If you try the InputOutput\Exif demo, you can view the camera meta data for your images.

For images that are already oriented correctly the EXIF_Orientation value should be 1 (or 0 or missing). If they are something else (and you have enabled EnableAdjustOrientation) then ImageEn will rotate the images for correct display:

http://www.imageen.com/help/TIOParams.EXIF_Orientation.html

In this case the image IS already oriented correctly, but because the EXIF_Orientation value is 6, ImageEn thinks it needs to rotate it.

I.e. the images should display correctly if you set:

ImageEnFolderMView1.EnableAdjustOrientation := False;
ImageEnView1.IO.Params.EnableAdjustOrientation := False;


The question is why the images have the wrong Orientation value. Did they come directly from the phone like this?


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: