I want to print an 8bit sRGB PNG image on an Epson TM-T88v receipt printer. The printer needs a 4bit grayscale PNG file to print it correctly.
As I'm using PHP with ImageMagick, I'm not sure which commands are needed to convert the image.
If I use ImageMagick's "identify" and "convert" on the linux console on the 8bit input image I get following output:
test.png PNG 128x128 128x128+0+0 8-bit sRGB 1.78KB 0.000u 0:00.000
I've tried...
convert test.png -depth 4 -colorspace gray test-4bit.png
which gives me still an 8bit image instead of 4bit
test-4bit.png PNG 128x128 128x128+0+0 8-bit sRGB 2.58KB 0.000u 0:00.000
Any suggestions?
magick source.png -colorspace gray -depth 4 destination.png
using ImageMagick 7.0.7-28 Q16 x64 2018-03-25 and it seems to work.