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
 Printer Friendly
Author Previous Topic Topic Next Topic  

PeterPanino

340 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

5327 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/ImageEn/TImageEnIO.LoadFromFileAuto.html

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

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

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

PeterPanino

340 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

5327 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/ImageEn/TIOParams.EXIF_XPComment.html
XMP Description: https://www.imageen.com/help/ImageEn/TIOParams.XMP_Info.html
IPTC Description: https://www.imageen.com/help/ImageEn/TIOParams.IPTC_Photoshop.html

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

For PNG:
Text Fields: https://www.imageen.com/help/ImageEn/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
 Printer Friendly
Jump To: