IIXC_Page::Correction Method

From PDF XChange PDF SDK
Revision as of 07:50, 29 April 2015 by Oliynykd (Talk | contribs)

Jump to: navigation, search


The method of allows brightness, contrast and gamma adjustments to the tonal range of a page for each valid color channel, Red, Green and Blue. This function applies the same defined value to every pixel in the page (or its rectangular area, if specified) for the color specified.

Syntax

HRESULT Correction([in]  RECT*   pRect,
                   [in]  double  nRedBr,
                   [in]  double  nGreenBr,
                   [in]  double  nBlueBr,
                   [in]  double  nRedCont,
                   [in]  double  nGreenCont,
                   [in]  double  nBlueCont,
                   [in]  double  nRedGamma,
                   [in]  double  nGreeGamma,
                   [in]  double  nBlueGamma);

Parameters

pRect
[in] Pointer to RECT structure which defines the rectangular area where the function should be applied. If this parameter is NULL, the entire page will be processed.
Note:
Please note that partial processing of an area of a page is not supported for all image formats. For example, it is not supported for indexed images, because each pixel in such images contains not a color, but an index into a color table (palette) which is common for the entire page
nRedBr
[in] Specifies the brightness level to be applied to the red channel of the page or area. The range of the value is from -255.0 to +255.0.
If the image doesn't contain a red channel (gray image), this parameter is ignored.
nGreenBr
[in] Specifies the brightness level to be applied to the green channel of the page or area. The range of the value is from -255.0 to +255.0.
If the image doesn't contain a green channel (gray image), this parameter is ignored.
nBlueBr
[in] Specifies the brightness level to be applied to the blue channel of the page or area. The range of the value is from -255.0 to +255.0.
This parameter is used as the brightness level for images that contains only a gray channel.
nRedCont
[in] Specifies the level of contrast to be applied to the red channel of the page or area. The range of the value is from 0.0 to 2.0 (with value of 1.0 contrast level will be not changed).
If the image doesn't contain a red channel (gray image), this parameter is ignored.
nGreenCont
[in] Specifies the level of contrast to be applied to the green channel of the page or area. The range of the value is from 0.0 to 2.0 (with value of 1.0 contrast level will be not changed).
If the image doesn't contain a green channel (gray image), this parameter is ignored.
nBlueCont
[in] Specifies the level of contrast to be applied to the blue channel of the page or area. The range of the value is from 0.0 to 2.0 (with value of 1.0 contrast level will be not changed).
This parameter is used as contrast level for images that contain only a gray channel.
nRedGamma
[in] Specifies the level of gamma to be applied to the red channel of the page or area. The range of the value is from 0.125 to 8.0 (with value of 1.0 gamma level will be not changed).
If the image doesn't contain a red channel (gray image), this parameter is ignored.
nGreeGamma
[in] Specifies the level of gamma to be applied to the green channel of the page or area. The range of the value is from 0.125 to 8.0 (with value of 1.0 gamma level will be not changed).
If the image doesn't contain a green channel (gray image), this parameter is ignored.
nBlueGamma
[in] Specifies the level of gamma to be applied to the blue channel of the page or area. The range of the value is from 0.125 to 8.0 (with value of 1.0 gamma level will be not changed).
If the image doesn't contain blue channel (gray image), this parameter is ignored.

Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

See also IIXC_Page.