6

I'm having trouble converting images to 1bit dithered images using GraphicsMagic. The converted images are to be used as input for a thermal printer.

I'm using the following command:

gm convert input.jpg -resize 384 -monochrome -dither out.bmp

The result is a 1bit dithered image, but the quality is different then e.g. a dithered image from GIMP, The GIMP (or resulting images from other programs) image looks slightly better.

Does anyone have tips to achieve the same results? (I have experimented with other GraphicsMagic options, but to no avail)

Original

ORIGINAL

GraphicsMagick

GM

GIMP

GIMP

Woozer
  • 73
  • 1
  • 6

1 Answers1

9

You can dither in a fashion closer to GIMP using this command:

convert scooter.png -resize 384 -dither FloydSteinberg -remap pattern:gray50 scooter_d.gif

enter image description here

By the way, you can get rather good results using an ordered dither like this:

convert scooter.png -colorspace gray -ordered-dither o8x8 result.gif

enter image description here

Kudos to Anthony Thyssen who wrote the excellent ImageMagick Usage pages - Quantisation with ImageMagick.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Nice! That looks more like it, I used GraphicsMagick, and it does not support the remap option (or i could not find it). So I switched to Imagemagick. Thanks for the help. – Woozer Jan 12 '16 at 14:34