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
 Explorer Rotated photos gets Rotated in ImageEn
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Jan 06 2018 :  02:35:15  Show Profile  Reply
Hello,

When a user rotates a photo using Explorer's rotation feature and this particular photo is opened in ImageEn it is again rotated based on EXIF information it seems.

How to detect such rotation and prevent it?

TIA


Yogi Yang

w2m

USA
1990 Posts

Posted - Jan 06 2018 :  09:37:25  Show Profile  Reply

To prevent auto rotation remove exoCorrectOrientation from TIOParams.EXIF_Orientation or set EnableAdjustOrientation to False.

Description

The orientation of the camera relative to the scene, when the image was captured

Value Description
_exoCorrectOrientation
(1) Image is Orientated Correctly (top left side)
_exoNeedsHorizontalFlip (2) Image is Horizontally Flipped (top right side)
_exoNeeds180Rotate (3) Image is Offset by 180º (bottom right side)
_exoNeedsVerticalFlip (4) Image is Vertically Flipped (bottom left side)
_exoNeedsHorzAndVertFlip (5) Image is Flipped Horiz. and Offset 90º CCW (left side top)
_exoNeeds90RotateCW (6) Image is Offset by 90º CCW (right side top)
_exoNeedsFlipHorzAnd90Rotate (7) Image is Flipped Horiz. and offset 90º CW (right side bottom)
_exoNeeds270RotateCW (8) Image is Offset by 90º clockwise (left side bottom)

ImageEnView1.IO.Params.EnableAdjustOrientation := False;
ImageEnView1.IO.LoadFromFile('C:\input.jpg');

I have no idea why it is rotated twice.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

xequte

39053 Posts

Posted - Jan 07 2018 :  17:40:18  Show Profile  Reply
Hi Yogi

It is possible that when it was rotated previously, the orientation was not updated in the meta-data to reflect the changes so ImageEn thinks it still needs to be updated (assuming EnableAdjustOrientation = True).

Though in my experience, Explorer does correctly update the orientation after rotation.



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

yogiyang

India
727 Posts

Posted - Jan 07 2018 :  23:26:51  Show Profile  Reply
Yes Bill you are right.

I forgot to mention that I am using LoadFromFileAuto to load images/photos.

TIA


Yogi Yang
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: