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
 Manipulating metadata of image file w. unknown ext
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

860 Posts

Posted - Jun 27 2020 :  17:35:12  Show Profile  Reply
I am loading an image file into an ImageEnView. That image has an unknown file extension (e.g. .MyUnknownExt). So ImageEnView must detect itself what real image type the file is (.png or .jpg or .gif etc.).

Then ImageEnView mus get the comment metadata string from that image file. Then ImageEnView must MODIFY the found comment metadata string or create a new one. Then ImageEnView must save the file using the same .MyUnknownExt file extension but maintaining the same image file type (.png or .jpg or .gif etc.).

How can I do that?

xequte

38182 Posts

Posted - Jun 28 2020 :  03:04:39  Show Profile  Reply
Hi Peter

If you use LoadFromFileAuto ImageEn will only use the file content to determine what type of image it is (ignore the extension):

https://www.imageen.com/help/TImageEnIO.LoadFromFileAuto.html

You can also use the global method FindFileFormat to determine the file type:

https://www.imageen.com/help/FindFileFormat.html

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

PeterPanino

860 Posts

Posted - Jun 28 2020 :  12:17:54  Show Profile  Reply
Nigel, thanks for the quick answer. But the more important part of my question was: How to get/set the METADATA comment from/to .png, .jpg, .gif, etc.?
Go to Top of Page

xequte

38182 Posts

Posted - Jun 28 2020 :  16:23:46  Show Profile  Reply
Hi Peter

Different files have different meta-data properties.

For JPEG and TIFF:
EXIF Comment: https://www.imageen.com/help/TIOParams.EXIF_XPComment.html
XMP Description: https://www.imageen.com/help/TIOParams.XMP_Info.html
IPTC Description: https://www.imageen.com/help/TIOParams.IPTC_Photoshop.html

For GIF:
GIF Comments Field: https://www.imageen.com/help/TIOParams.GIF_Comments.html

For PNG:
Text Fields: https://www.imageen.com/help/TIOParams.PNG_TextKeys.html

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