Is there a way to set dither quality?

Martin
2013-02-15
2013-02-17
  • Martin
    Martin
    2013-02-15

    I need use dither function to generate black and white tiff (1 bit).
    Some software allow to set a "quality" of dither function, this function allow to have more black or more white pixel on the result image. I hope you understand it.

    Is this possible with FreeImage?

    NOTE: I use Delphi whapper and TFreeWinBitmap.

    Thanks

     
  • Hervé Drolon
    Hervé Drolon
    2013-02-17

    Hi,

    FreeImage provides several dithering algorithms :

    FID_FS = 0, // Floyd & Steinberg error diffusion
    FID_BAYER4x4 = 1, // Bayer ordered dispersed dot dithering (order 2 dithering matrix)
    FID_BAYER8x8 = 2, // Bayer ordered dispersed dot dithering (order 3 dithering matrix)
    FID_CLUSTER6x6 = 3, // Ordered clustered dot dithering (order 3 - 6x6 matrix)
    FID_CLUSTER8x8 = 4, // Ordered clustered dot dithering (order 4 - 8x8 matrix)
    FID_CLUSTER16x16= 5, // Ordered clustered dot dithering (order 8 - 16x16 matrix)
    FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix)

    However, I've never heard about a "quality factor" for this kind of algorithm.
    What do you mean exactly ?

    Hervé