Color Promotion

 

Color Promotion is used to increase the number of bits per pixel.

 

For Monochrome to grayscale promotion, use on e of the following functions/methods:

 

ConvMonoDIBtoGrayscale (BiDIB.dll)

ConvertMonoDIBtoGrayscale (BiDIB.ocx)

 

For 8 bit to 24 bit promotion use the Convert8to24 function/method from the BiDIB DLL/OCX

 

[C++]

 

/* Color Promotion*/

 

#include “BiDIB.h”

 

HDIB hDibNew;

 

/* 1. parameter: Handle of the DIB to convert */

 

hDibNew = Convert8to24(hDib);

 

if (!hDibNew)

{

            // Error

}

 

[VB]

 

‘ Color Promotion

 

Dim BiDIBobj as Object

Dim hDibNew as Long

 

Set BiDIBobj = CreateObject("BIDIB.BIDIBCtrl.1")

 

‘ 1. parameter: Handle of the DIB to convert

 

hDibNew = BiDIBobj.Convert8to24(hDib)

 

Set BIDIBObj = Nothing

 

If hDibNew = 0 Then

            ‘ Error

End If

 

[C#]

 

/* Color Promotion*/

 

int hDibNew;

 

/* 1. parameter: Handle of the DIB to convert */

 

hDibNew = BiImage.Convert8to24(hDib);

 

if (hDibNew == 0)

{

            // Error

}