For printing images on a Epson TM-T88v receipt printer, I had to convert a PNG file to a 4-bit grayscale PNG by using ImageMagick.
Using the following command I'm getting pretty good results except of a white border around certain parts of the converted image:
convert test.png -depth 4 -colorspace gray -define png:color-type=0 -define png:bit-depth=4 test-4bit-gray.png
Original input image:
Converted image:
If I use Epson's native JS library to convert PNG images to 4-bit grayscale I get following result which looks way smoother:
Which ImageMagick options could help me to avoid the white border around the heart eyes of the Emoji or make it to look smoother at all?