RedEyeRemover

#include "BIFilter.H"

 

HDIB CALLBACK RedEyeRemover(HDIB             HDIB,
LPRECT         rect,
int                    iShowProgress,
HWND           hParen,
LPR_LIMITS pLimitst)

Description

This function will remove the red eye from the image. This function works for only 24 bit per pixel images.

Parameters

HDIB

hDIB

Handle of the input DIB.

LPRECT

rect

Pointer to the rectangle, that specifies the area to search for red eye.

int

iShowProgress

This parameter specifies the progressbar and the preview dialog displaying.

Available values:

DISPLAY_NONE (0)     -     The progressbar and the preview dialog will not display before removing red eye.

DISPLAY_PROGRESS (1) - The progressbar will display during red eye removal procedure.

DISPAY_DIALOG (2)   -     The preview dialog will display before removing red eye. This dialog shows the part of the selected area of the image before and after the conversion.

DISPLAY_BOTH (3)     -     The progressbar and the preview dialog will display.

IMPORTANT: The preview dialog only displays if BiDlgs.dll is installed.

HWND

hParent

Handler of the parent window.

LPR_LIMITS

pLimits

Pointer to the structure that contains the value of the red tolerance and the effect level. If this parameter is NULL, these values will be the defaults.

Return values

The handle of the new DIB or NULL if an error occurred. The GetLastFilterError function will return the error code.

Programming notes

The function will not free the input DIB.

The coordinates of rectangle must be positive. Top must be less than bottom, and left must be less than right. The function return NULL and the error code will be ERROR_INVALID_PARAMETER in all other cases.

If the BIImage.dll is missing, the error ode will be ERROR_NO_BIIMAGE.

Requirements

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

Library :    Use BIFilter.lib.

DLLs :       BIFilter.dll, BiDlgs.dll.