I need to convert a colored image to an 8 bit monochrome PNG. Not a grayscale PNG nor a 1/2/4/16/24/32 bit PNG, but 8 bit with the only colors in the palette being black and white. Yes, I know that is silly, but that is what I need.
My current closest attempt is:
Code: Select all
convert 32bitcolors.png -alpha off -dither None -monochrome PNG24:tmp.png
convert tmp.png -depth 8 -colors 256 PNG8:blackwhite.png
If I leave out the PNG8: or use -colors 2 then it becomes a grayscale PNG.
If I add -depth 8 or -define png:color-type=3 or -define png:bit-depth=8 or combinations thereof, it has no effect.
What is the magic combination to make IM do as I want?