Q: How can I reduce the bit resolution of an image?
A: To reduce the bit resolution of an image use the dithering methods. Dithering methods are proposed to reduce the bit resolutions of an image with the least quality loss. There are two types of dithering implemented in BIIMAGE.OCX, error diffusion and ordered dithering. Error diffusion dithering methods can produce 8, 4 and 1 bit per pixel images, ordered ditherings always produce 1 bit per pixel images. For further images see the descriptions of the ditherings above in chapter Dithering Methods.
Code example:
Dim hSourceDib As Long
Dim hResDib As Long
Dim BIImageObj As Object
‘ Load the input image
…
Set BIImageObj = CreateObject("BIIMAGE.BIImageCtrl.1")
hResDib = BIImageObj. BIImageObj. DitherFS4(hSourceDib, 1);
Set BIImageObj = Nothing
‘ Further processing