HistDIBStretch  Method

Description         This method increases the dynamic range of the gray levels. It multiplies pixels by ‘Const’ if the original pixel value is between ‘Begin’ and ‘End’. The result is put to a newly created DIB and the source DIB is unmodified. It works with 4, 8 or 24 bits/pixel. In case of 24 bits/pixel, the operation is made separately on the R, G, B channels. In case of 4 or 8 bits/pixel, the source DIB must contain grayscale image and the palette values in the source DIB must be monotone increasing. It makes no sense to use this function in case of 1 bits/pixel.

Syntax                 lRet = [BIFilter.]HistDIBStretch  Dib Begin End Const iShowProgress hWnd

Remarks             lRet                         LONGLONG            Handle of the newly created DIB on success or 0 on failure.

                            Dib                          LONGLONG Source DIB.

                            Begin                      short                Beginning of the range.

                            End                         short                End of the range.

                            Const                      Long                Quantity of the contrast stretch.

                            iShowProgress       short                This parameter specifies the displaying of the progressbar and the preview dialog.

Available values:

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

DISPLAY_PROGRESS (1) - The progressbar will display during the  procedure.

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

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

IMPORTANT: The preview dialog will only display, if there is BIDlgs32.dll installed.           

                            hWnd                     LONGLONG Handler of the parent window.

If the result of multiplication (pixelvalue * fConst) overflows, then the maximum pixel value is used instead of the result. Maximum pixel values: 4 bits/pixel: 15,   8 bits/pixel: 255,   24 bits/pixel: 255 for each channel. There are three channels on 24 bits/pixel (R, G, B).

See Also