IIXC_Page::TableFilter Method

From PDF XChange PDF SDK
Jump to: navigation, search

The TableFilter method applies a general table filter to an image page or its specified rectangular area.


HRESULT TableFilter([in]            RECT*   stRect,
                    [in, optional]  UCHAR*  nB_Table,
                    [in, optional]  UCHAR*  nG_Table,
                    [in, optional]  UCHAR*  nR_Table);


[in] Pointer to the RECT structure which defines the rectangular area where the function should be applied. If this parameter is NULL, the entire page will be processed.
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 pixels in such images do not contain a color, but an index into a color table (or palette) which is common for the entire page.
[in, optional] Specifies the blue table.
[in, optional] Specifies the green table.
[in, optional] Specifies the red table.

Return Value

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


Each table should have the size of 256.

For each pixel in the image its color value is changed according values passed through the tables. i.e. pixel's color value is (5, 120, 17). New color for this pixel will be the color with the component values taken from the tables with indexes (5, 120, 17). So the final color value for the selected pixel will be: (B_Table[5], G_Table[120], R_Table[17]).

See Also