IIXC_Page::Correction Method

From Tracker Software PDF SDK
Jump to: navigation, search
(Automatic page editing by robot)
 
m (Automatic page editing by robot)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IIXC_Page::Correction Method}}
 
{{#customTitle:IIXC_Page::Correction Method}}
 +
{{#parentPage:PXV:IIXC_Page#Methods|Correction|method}}
  
The method of interface of PDF-XChange Editor SDK.
+
The '''Correction''' method 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 the specified rectangular area) for the color specified.
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT Correction([in] RECT* pRect, [in] double r_br, [in] double g_br, [in] double b_br, [in] double r_cont, [in] double g_cont, [in] double b_cont, [in] double r_gamma, [in] double g_gamma, [in] double b_gamma);</pre>
+
<pre class="brush:cpp;gutter:false">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 nGreenGamma,
 +
                  [in] double nBlueGamma);</pre>
  
 
== Parameters ==
 
== Parameters ==
;''pRect''
+
;pRect
:[in]  Pointer to RECT.
+
:[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.
;''r_br''
+
{{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 does not contain a color, but an index into a color table (or palette) which is common for the entire page}}
:[in]  Value of double.
+
;nRedBr
;''g_br''
+
:[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.
:[in]  Value of double.
+
:If the image doesn't contain a red channel (gray image), this parameter is ignored.
;''b_br''
+
;nGreenBr
:[in]  Value of double.
+
:[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.
;''r_cont''
+
:If the image doesn't contain a green channel (gray image), this parameter is ignored.
:[in]  Value of double.
+
;nBlueBr
;''g_cont''
+
:[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.
:[in]  Value of double.
+
:This parameter is used as the Brightness level for images that contains only a gray channel.
;''b_cont''
+
;nRedCont
:[in]  Value of double.
+
:[in]  Specifies the Contrast level 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).
;''r_gamma''
+
:If the image doesn't contain a red channel (gray image), this parameter is ignored.
:[in]  Value of double.
+
;nGreenCont
;''g_gamma''
+
:[in]  Specifies the Contrast level 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).
:[in]  Value of double.
+
:If the image doesn't contain a green channel (gray image), this parameter is ignored.
;''b_gamma''
+
;nBlueCont
:[in]  Value of double.
+
:[in]  Specifies the Contrast level 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 Gamma level 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.
 +
;nGreenGamma
 +
:[in]  Specifies the Gamma level 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 Gamma level 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 ==
 
== Return Value ==
Line 33: Line 54:
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IIXC_Page|IIXC_Page]].
+
[[PXV:IIXC_Page|IIXC_Page]]

Latest revision as of 06:56, 23 May 2015

The Correction method 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 the specified rectangular area) 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  nGreenGamma,
                   [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 does not contain a color, but an index into a color table (or 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 Contrast level 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 Contrast level 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 Contrast level 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 Gamma level 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.
nGreenGamma
[in] Specifies the Gamma level 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 Gamma level 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

IIXC_Page