combining chained convert commands into one
Posted: 2015-09-09T18:41:29-07:00
I'm trying to darken and blur a grayscale PNG image, and then replace all pixels which are darker than gray2, with gray2.
This works fine:
However if I try to combine them all into one command to avoid creating the intermediate images b.png and c.png, it doesn't have the same result:
What am I missing?
This works fine:
Code: Select all
convert a.png -level 0%,85% -blur 0x5 b.png
convert b.png -black-threshold '2%' c.png
convert c.png -fill gray2 -opaque black d.png
Code: Select all
convert a.png -level 0%,85% -blur 0x5 \
-black-threshold '2%' \
-fill gray2 -opaque black d.png