fmw42 wrote:The PNG developer may have other ideas to suggest.
Oh sorry, I know there are multiple ways to define/talk about bit depth. I and the website are talking about 2 bits per pixel, so up to 4 different colors at once. I'd like to have my images indexed with a bit depth of 2, which works when I feed it 3 or 4 colors.
glennrp wrote:Don't use "PNG8:" because that forces a bit-depth of 8. Try this:
Code: Select all
convert test.png -colors 4 \
-define png:color-type=3 \
-define png:bit-depth=2 \
-define png:exclude-chunk=bKGD \
test5.png
(excluding the bKGD to prevent your image from having 5 colors, that won't fit in a 2-bit palette)
That worked! Thank you so much! I did change one thing though (for future reference if anyone needs anything as specific as this
). With
the resulting image came out negated and gave me the warning
Code: Select all
convert: Wrote palette index exceeding num_palette `src/gfx/music2.png' @ warning/png.c/MagickPNGWarningHandler/1656.
It's probably just me misunderstanding how the input file should have been formatting, but removing it worked so I'm content.
Thank you all very much!