
And I'm wondering how I can threshold the red so that it only shows the darkest reds, like in the image below.

Ideally, the output would be have the white as a transparent png background.
You can get a result much like your example output image if you start by creating a sort of threshold transparency mask from a clone of your input image. Then you can composite that mask onto the input image to leave only the darkest red showing on a transparent background. I've tried this with IM 6.9.8 in Windows and IM 6.7.7 from bash. In Windows CMD syntax...graftonclipper wrote: ↑2017-09-14T15:16:27-07:00Hi, I have transparent PNGs that look like this [...] And I'm wondering how I can threshold the red so that it only shows the darkest reds, like in the image below. [...] Ideally, the output would be have the white as a transparent png background.
Code: Select all
convert input.jpg -alpha set ^
( -clone 0 -colorspace gray -brightness-contrast 25,100 -negate -alpha copy ) ^
-compose copyopacity -composite output.png