bOk = MImgDither( hImage, nMethod )

Dithers an image with one of 8 methods.

Parameters
hImage
Number: Handle of the image

nMethod
Number: The method to use. Specify one of the following constants:

MIMG_DITHER_FLOYD

Floyd-Steinberg. Good for the most images.

MIMG_DITHER_ORDERED

Ordered

MIMG_DITHER_BURKES

Burkes

MIMG_DITHER_STUCKI

Stucki

MIMG_DITHER_JARVIS

Jarvis-Judice-Ninke

MIMG_DITHER_SIERRA

Sierra

MIMG_DITHER_STEVENSON

Stevenson-Arce

MIMG_DITHER_BAYER

Bayer

Return
Number: TRUE if successful or FALSE if an error occurs

Example
Let's see the differences between the methods for a sample image:

 

 

 

Original

 

 

 

Dithered with method "Floyd-Steinberg"

Dithered with method "Ordered"

Dithered with method "Burkes"

Dithered with method "Stucki"

Dithered with method "Jarvis-Judice-Ninke"

Dithered with method "Sierra"

Dithered with method "Stevenson-Arce"

Dithered with method "Bayer"

See also
MImgGrayScale

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator