Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: JpegImage.LoadFromFile not same orientation as Windows Explorer



Permlink Replies: 1 - Last Post: Mar 20, 2017 7:47 AM Last Post By: steven chesser Threads: [ Previous | Next ]
Adalberto Baldini

Posts: 127
Registered: 1/31/12
JpegImage.LoadFromFile not same orientation as Windows Explorer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 20, 2017 5:29 AM
Delphi XE5

I load a JPEG from file into a TImage :
var
JpegImage: TJPEGImage;
begin
...
JpegImage.LoadFromFile(OpenDlg.FileName);
New_Image.Picture.Assign(JpegImage);
....
I get image not always oriented same way I see with Windows.Explorer Showing big Icons
Maybe file was rotated.

How can I Know if image.file is rotated ?
How do I rotate the image ?

Regards
Adalberto Baldini
steven chesser

Posts: 389
Registered: 4/13/09
Re: JpegImage.LoadFromFile not same orientation as Windows Explorer
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 20, 2017 7:47 AM   in response to: Adalberto Baldini in response to: Adalberto Baldini
I assume it is Exif Orientation Tag in the image that tells windows how to flip it.

If so, probably need pull the EXIF data out and check Orientation then flip it as needed yourself?

In VCL land, I use ImageEN for pretty much all my image needs.. and it supports this flag with ability to enable/disable usage of it.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02