ConvertColorSpace

#include "BIImage.H"

 

int CALLBACK ConvertColorSpace (BYTE*       bufferSrc,

                                                              BYTE*       bufferDest,

                                                              int               iSize,

                                                              int               nFormatSrc,

                                                              int               nFormatDest,
BOOL        bShowProgress,
HWND       hParent)

Description

This function will convert the color values in the input buffer specified by the color format. You should allocate enough memory for input and output buffers.

Parameters

BYTE*

bufferSrc

Pointer to the input buffer.

BYTE*

bufferDest

Pointer to the output buffer.

Int

iSize

Number of elements of the input buffer.

int

nFormatSrc

Color space format of the input buffer. If this parameter is not valid, the function returns 0.

Int

nFormatDest

Color space format of the output buffer. If this parameter is not valid, the function returns 0.

BOOL

bShowProgress

This parameter specifies the displaying of the progressbar.

HWND

hParent

Handler of the parent window. If the iShowProgress parameter is FALSE, this parameter will be ignored.

Return values

Returns the number of the converted color values. If any error occurs the GetLastColorConvertError function will be retrieves the error code.

Programming notes

Requirements

Header :     Declared in BIImage.h; include BIImage.h.

Library :    Use BIImage.lib.

DLLs :       BIimage.dll.