This project has moved and is read-only. For the latest updates, please go here.

How to get "icc:model" of an image

Mar 4, 2015 at 9:04 AM
I get null trying to get "icc:model" attribute from my Image.

But it's working for "description". When I do image.GetAttribute("icc:description"), it's not null

When I use Identify -verbose myimage.jpg, in Properties section I see both icc:model and icc:description.

I create MagickImage object this way

byte[] data = new byte[file.ContentLength];
file.InputStream.Read(data, 0, file.ContentLength);
MagickImage image = new MagickImage(data);

InputStream isn't null.
data isn't null. Even converted it to String to look what's happening there :)

What can I do wrong?
Mar 4, 2015 at 9:27 AM
Can you add a link to the image you are using? Feel free to contact me through CodePlex if you don't want to publicly share your image.
Mar 4, 2015 at 9:33 AM
Edited Mar 4, 2015 at 9:35 AM
I'm Sorry. Seems it was a Visual Studio issue. Now it's all working fine. Thank you for answering
Mar 4, 2015 at 11:35 AM
Edited Mar 4, 2015 at 11:48 AM
But still. How to know color model of an image? Is there a 100% true way? I tried to do this by icc:model, but it seems like bmp files can't have such properties, and png files don't have icc:model for sRGB.
I converted bmp and png files to sRGB and Adobe RGB color models using photoshop and online converter. Photoshop defines them as sRGB or Adobe RGB, But using "identify" I can't find any property to define my pic

What is the right way to know is my pic is sRGB or anyOther RGB using

Thank you for your patience.

Here are links to my pics if they are needed



Mar 4, 2015 at 12:09 PM
I am not sure if Magick.NET will be the right tool for you if you need a "100% true way". Look at this part from the documentation (

ImageMagick supports color profiles, however, for images without a profile or a declaration of colorspace, ImageMagick assumes non-linear sRGB.

image.GetAttribute("icc:model") looks at the color profile and returns the name from an embedded profile if it exists.
Mar 5, 2015 at 3:10 AM
Thank you) This information can be very helpful for me!