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
 EXIF_DateTimeOriginal
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

John

USA
94 Posts

Posted - Oct 13 2012 :  22:02:01  Show Profile  Reply
Hello

Windows 7, Delphi XE2 and ImageEn 4.1.2

One can
a) load a jpg file in an ImageEnView1 component
b) crop the loaded image and subsequently save the cropped image to either the same file or a new file, and retain the EXIF data of the original image.


However if an image is
a) loaded into an ImageEnView1
b) cropped and
c) the result of the crop is assigned to a second ImageEnView2 component which is
d) subsequently saved as a separate file
e) the newly created image contains no EXIF data. (see below)


ImageEnView1.Proc.CropSel;
// copy cropped image to target image
ImageEnView2.Assign(ImageEnView1);

ImageEnView1.proc.Undo;

ImageEnView2.Fit;
ImageEnView2.IO.SaveToFileJpeg(tempPtPhotoPath + formViewPhotographs.kbmMemTablePhotos.FieldByName('FileName').AsString);


Question:

If the Assign procedure of an ImageEnView component is used to move an existing image from one ImageEnView component to a second ImageEnView component, is there a mechanism to also transfer the EXIF data so that if the second image is saved it will contain the original EXIF data?


TIA

John

w2m

USA
1990 Posts

Posted - Oct 14 2012 :  06:53:33  Show Profile  Reply
See TIOParams.EXIF_HasEXIFData in the help file
// Assign EXIF data to ImageEnView2 from ImageEnView1
ImageEnView2.IO.Params.Assign(ImageEnView1.IO.Params);


William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

John

USA
94 Posts

Posted - Oct 14 2012 :  20:16:49  Show Profile  Reply
Solved.

Thank you very much for the help.

John
Go to Top of Page

John

USA
94 Posts

Posted - Mar 04 2014 :  17:51:52  Show Profile  Reply
The ImageEn demo CameraGetImages does not transfer the EXIF data and the suggestion previously discussed does not work using the ImageEnView2.IEBitmap.

Does someone have a suggestion as to how to transfer the EXIF data to ImageEnView1, specifically the
ImageEnView1.IO.Params.EXIF_DateTime2 and EXIF_DateTimeOriginal?


TIA

John
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 04 2014 :  19:08:21  Show Profile  Reply
I am surprised you said a few months ago that the problem was solved. In any event maybe try this:
// copy the EXIF info (not the image) from file one.jpg inside two.jpg, without loading any image
ImageEnView2.IO.ParamsFromFile('D:\one.jpg');
ImageEnView2.IO.InjectJpegEXIF('D:\two.jpg');

Also see IO.InjectJpegEXIFStream in the help file.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
Go to Top of Page

John

USA
94 Posts

Posted - Mar 05 2014 :  13:00:13  Show Profile  Reply
The issue now deals specifically with the demo and how to get the path to the image via code so that ParamsFromFile can be called. TreeView1.Items.Item[Node.Index].Text obviously gets the file name, but the mechanism to capture the path escapes me.

TIA

John
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 05 2014 :  13:25:03  Show Profile  Reply
If you are getting the pictures directly from the camera via usb connection, then it is not possible to get the path to the image... There is no path in the camera demo. There is nothing that can be done about this as the camera images are opened via twain and the twain does not support the windows file system.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: