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: 35
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 »

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: 25562
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 »

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: 35
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 »

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: 12159
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 »

I suggest you search for the characters "sRGB" in the name.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
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 »

try

Code: Select all

convert image -format "%[profile:icc]" info:
then as snibgo says, look for sRGB in the returned information.
loki5100
Posts: 35
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 »

thanks i will do like this ...
Post Reply