How to identify if an image have an embed sRGB icc profile?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
loki5100
Posts: 22
Joined: 2018-02-24T14:51:41-07:00
Authentication code: 1152

How to identify if an image have an embed sRGB icc profile?

Post by loki5100 » 2018-02-25T14:35:00-07:00

I would like to remove from my images their sRGB profile if they have one. The problem i don't know how to identify that an image have a sRGB profile. What the good way to do ?

User avatar
fmw42
Posts: 24128
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to identify if an image have an embed sRGB icc profile?

Post by fmw42 » 2018-02-25T14:41:18-07:00

If you want to remove any .icc profile, then use

Code: Select all

convert image +profile "icc" result
See https://www.imagemagick.org/Usage/formats/#profiles

You can test for profile using

Code: Select all

convert image -format "%[profiles]" info:
See https://www.imagemagick.org/script/escape.php

loki5100
Posts: 22
Joined: 2018-02-24T14:51:41-07:00
Authentication code: 1152

Re: How to identify if an image have an embed sRGB icc profile?

Post by loki5100 » 2018-02-25T23:17:50-07:00

thanks fmw42 but this not say me if it's was a sRGB profile or other that was in the picture :( i want only to delete sRGB profile

snibgo
Posts: 10957
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to identify if an image have an embed sRGB icc profile?

Post by snibgo » 2018-02-26T04:29:59-07:00

I suggest you search for the characters "sRGB" in the name.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 24128
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to identify if an image have an embed sRGB icc profile?

Post by fmw42 » 2018-02-26T10:39:32-07:00

try

Code: Select all

convert image -format "%[profile:icc]" info:
then as snibgo says, look for sRGB in the returned information.

loki5100
Posts: 22
Joined: 2018-02-24T14:51:41-07:00
Authentication code: 1152

Re: How to identify if an image have an embed sRGB icc profile?

Post by loki5100 » 2018-02-26T10:52:44-07:00

thanks i will do like this ...

Post Reply