Getting metadata values embedded in image

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
rgdcastro
Posts: 2
Joined: 2019-05-21T11:12:23-07:00
Authentication code: 1152

Getting metadata values embedded in image

Post by rgdcastro » 2019-05-21T11:18:59-07:00

Hi there,

I'm looking to get the icc:description from the metadata but having trouble doing so.
I tried the exifprofiles but the values I need are not there.

Code: Select all

ExifProfile exifProfile = image.GetExifProfile();
Below is the sample metadata I need.

Code: Select all

icc:copyright: Copyright 1999 Adobe Systems Incorporated
    icc:description: Adobe RGB (1998)
    icc:manufacturer: Adobe RGB (1998)
    icc:model: Adobe RGB (1998)
Hoping someone can help.

User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Getting metadata values embedded in image

Post by dlemstra » 2019-05-21T12:55:18-07:00

You should be able to read that information with the `GetAttribute` method of the `MagickImage` class. For example: image.GetAttribute("icc:copyright"); But it would probably be very convenient to also have them as a property on the ColorProfile class so I created an issue on GitHub for this: https://github.com/dlemstra/Magick.NET/issues/443.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

rgdcastro
Posts: 2
Joined: 2019-05-21T11:12:23-07:00
Authentication code: 1152

Re: Getting metadata values embedded in image

Post by rgdcastro » 2019-05-28T09:28:34-07:00

Cool! I'll give that a try.

Yeah, it would really be great if that is added as a property on the ColorProfile class.
Thank you for this and for creating the issue on GitHub. :D

Post Reply