I am trying to find out the colorspace of an image using a command-line call.
identify -format %r myimage.jpg
gives me the colorspace, but this is concatenated onto the end of the image class (with no space).
Is it possible to get the colorspace without the image class?
If not, what are the possible values for image class? Is this the complete set:
DirectClass
PseudoClass?
(Knowing that enables me to parse the output to obtain the colorspace).
Thanks,
Martin
Getting colorspace using identify
Re: Getting colorspace using identify
just use %[colorspace] (http://www.imagemagick.org/script/escape.php)
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Getting colorspace using identify
Actually I'd look at %[channels] too these are a little mixed up in IMv6.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Getting colorspace using identify
To clarify, the commandDemonDVA wrote:just use %[colorspace] (http://www.imagemagick.org/script/escape.php)
Code: Select all
identify -format %[colorspace] test.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Getting colorspace using identify
you can introduce a new line ending by
Code: Select all
identify -format "%[colorspace]\n" test.jpg