Page 1 of 1

Convert all colors except black to transparent

Posted: 2013-11-13T11:23:09-07:00
by silversun
I have an app where users are uploading an image of their signature. As would be expected it is not always black on pure white. The background can become grainy and off color depending on the camera/scanner and other factors

Is there a way to tell imagick to make all colors except black transparent. The end goal is to have the signature on a transparent background.

Thank You for the help

Re: Convert all colors except black to transparent

Posted: 2013-11-13T13:12:59-07:00
by snibgo

Re: Convert all colors except black to transparent

Posted: 2013-11-13T13:18:52-07:00
by fmw42
you might also want to add a -fuzz XX% before +transparent black to adjust the range of near black the is excluded.

Re: Convert all colors except black to transparent

Posted: 2013-11-13T14:24:45-07:00
by silversun
Thank you both!!!

i combined the suggestions and got exactly what I needed!!!!