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
Convert all colors except black to transparent
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert all colors except black to transparent
"+transparent black". See http://www.imagemagick.org/script/comma ... ransparent
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert all colors except black to transparent
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
Thank you both!!!
i combined the suggestions and got exactly what I needed!!!!
i combined the suggestions and got exactly what I needed!!!!