I tried sprinkling some -set colorspace RGB -colorspace RGB around but it did not work.
The core of my script is
Code: Select all
cat "$workdir/src.png" |
# remove shades of gray1
convert png:fd:0 -fuzz 10% -fill black -opaque 'rgb(159,153,153)' png:fd:1 |
tee /tmp/step1.png |
# remove shades of gray2
convert png:fd:0 -fuzz 10% -fill black -opaque 'rgb(109,97,109)' png:fd:1 |
tee /tmp/step2.png |
# remove shades of gray3
convert png:fd:0 -fuzz 10% -fill black -opaque 'rgb(178,185,193)' png:fd:1 |
tee /tmp/step3.png |
# convert to grayscale with an emphasis on reds
convert png:fd:0 \
\( -clone 0 -channel GR -separate +channel -evaluate-sequence mean \) \
\( -clone 0 -channel RB -separate +channel -evaluate-sequence mean \) \
-delete 0 -evaluate-sequence mean \
png:fd:1 |
tee /tmp/step4.png |
# black text on white background
convert png:fd:0 -threshold 50% -negate png:fd:1 |
cat > "$workdir/bw.png"
How can I change this script to work in the same way it both version or, at least, only in version 6.7.7 but in the correct way?