"saturation" with -fx don't work?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bio

"saturation" with -fx don't work?

Post by bio »

Hi everyone :)

I'm tring extracting from a jpeg image like this (in.jpg)

Image

only the pixels that have a NOT GRAY color.

My idea is producing a black&white mask like this (mask.png)

Image

and go to this final result (out.png)

Image.


So... I know that gray pixels have R=G=B or saturation=0.

The first step I tried was:

convert in.jpg -fx "saturation>0" mask.png

BUT I receive an error:

convert: unable to parse expression 'saturation'

Is this a bug or the "saturation" expression don't exist anymore?

I'm running imagemagick 6.2.9 Q8 on Windows XP.
Thanks everyone can help me.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

saturation was the very last addition to the -fx operator. You have to be at the very latest BETA version for it to work.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
bio

Post by bio »

Thank you anthony!
Post Reply