Skip to content

fax: Improve quality of grayscale to black-and-white conversion.

Hermann Kraus requested to merge Herm/rogerrouter:faxquality into master

Sending faxes from material that is not pure back-and-white results in very bad image quality due to the way ghostscript rasterizes images by default. There are two things to improve the image quality:

  1. Use a different dithering algorithm
  2. Apply thresholds to map very bright colors to white and very dark colors to black:

I made a very simple test case:

image

The first line is pure black, second line is red, third line is a very dark gray.

Currently Roger Router produces this result:

image

With this change the result becomes:

image

Merge request reports