IIXC_Page::Correction Method

From Tracker Software PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(6 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|Correction Method|method}}
+
{{#parentPage:PXV:IIXC_Page#Methods|Correction|method}}
{{ToWrite}}
+
{{ToReview}}
+
  
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 ==
Line 16: Line 15:
 
                   [in]  double  nBlueCont,
 
                   [in]  double  nBlueCont,
 
                   [in]  double  nRedGamma,
 
                   [in]  double  nRedGamma,
                   [in]  double  nGreeGamma,
+
                   [in]  double  nGreenGamma,
 
                   [in]  double  nBlueGamma);</pre>
 
                   [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.
 +
{{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
 
;nRedBr
:[in]  Value of double.
+
:[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
 
;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.
 +
:If the image doesn't contain a green channel (gray image), this parameter is ignored.
 
;nBlueBr
 
;nBlueBr
:[in]  Value of double.
+
:[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
 
;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).
 +
:If the image doesn't contain a red channel (gray image), this parameter is ignored.
 
;nGreenCont
 
;nGreenCont
:[in]  Value of double.
+
:[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
 
;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
 
;nRedGamma
:[in]  Value of double.
+
:[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).
;nGreeGamma
+
:If the image doesn't contain a red channel (gray image), this parameter is ignored.
:[in]  Value of double.
+
;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
 
;nBlueGamma
:[in]  Value of double.
+
:[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 45: 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