pdfOptimizer 3.0.1 API
|
Wrapper class for an array presented as /Mask entry of the image. More...
Public Member Functions |
|
iText.Pdfoptimizer.Handlers.Util.MaskColors | GetConvertedColorMask (long maximumComponentValue, ColorConverter converter) |
Converts maskArray from one color space to another according to provided iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter. More... |
|
iText.Pdfoptimizer.Handlers.Util.MaskColors | GetConvertedColorMask (long maximumComponentValue, ColorConverter converter, ColorDecoder colorDecoder) |
Converts maskArray from one color space to another according to provided iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter and iText.Pdfoptimizer.Handlers.Util.Decoders.ColorDecoder. More... |
|
long[] | GetMin () |
Gets minimum color to mask out which is defined by the elements at even positions of the original array (considering the array as 0-indexed). More... |
|
long[] | GetMax () |
Gets maximum color to mask out which is defined by the elements at odd positions of the original array (considering the array as 0-indexed). More... |
|
bool | IsColorMasked (long[] color) |
Checks if provided color is masked by the current mask because all its components are in the range defined by the min and max arrays of the mask. More... |
|
PdfArray | ToPdfArray () |
Creates a mask iText.Kernel.Pdf.PdfArray from provided object. More... |
|
Static Public Member Functions |
|
static iText.Pdfoptimizer.Handlers.Util.MaskColors | Create (PdfArray array) |
Creates an instance of MaskArray based on /Mask entry of the image dictionary. More... |
|
Wrapper class for an array presented as /Mask entry of the image.
Wrapper class for an array presented as /Mask entry of the image. It is implemented as immutable class.
|
inlinestatic |
Creates an instance of MaskArray based on /Mask entry of the image dictionary.
array | is a Mask array, may be null |
array
is null
|
inline |
Converts maskArray from one color space to another according to provided iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter.
Converts maskArray from one color space to another according to provided iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter . It is expected that source color space of the converter matches the color space of the mask. Otherwise exception will be thrown.
maximumComponentValue | is a maximum value of each component. Unlike double representing of the color components, long components depend on the color depth and may represent different colors when used with different bits per component. Maximum component value notifies the maximum possible value for each component which usually is calculated as 2 ^ (bitsPerComponent) - 1 . However it is possible to use the method in another setting with any other maximum component value. It is expected that every value of the mask represented by this instance is not negative and does not exceed the maximumComponentValue |
converter | is a color converter. It is expected that its source color space which can be identified via iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter.GetSourceColorspace() matches the color space of the mask (at least it has the same number of components as GetMin() and GetMax() arrays). Otherwise, exception will be thrown |
|
inline |
Converts maskArray from one color space to another according to provided iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter and iText.Pdfoptimizer.Handlers.Util.Decoders.ColorDecoder.
Converts maskArray from one color space to another according to provided iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter and iText.Pdfoptimizer.Handlers.Util.Decoders.ColorDecoder . It is expected that source color space of the converter matches the color space of the mask. Otherwise, exception will be thrown.
maximumComponentValue | is a maximum value of each component. Unlike double representing of the color components, long components depend on the color depth and may represent different colors when used with different bits per component. Maximum component value notifies the maximum possible value for each component which usually is calculated as 2 ^ (bitsPerComponent) - 1 . However it is possible to use the method in another setting with any other maximum component value. It is expected that every value of the mask represented by this instance is not negative and does not exceed the maximumComponentValue |
converter | is a color converter. It is expected that its source color space which can be identified via iText.Pdfoptimizer.Handlers.Util.Pixel.ColorConverter.GetSourceColorspace() matches the color space of the mask (at least it has the same number of components as GetMin() and GetMax() arrays). Otherwise exception will be thrown |
colorDecoder |
iText.Pdfoptimizer.Handlers.Util.Decoders.ColorDecoder
|
inline |
Gets maximum color to mask out which is defined by the elements at odd positions of the original array (considering the array as 0-indexed).
|
inline |
Gets minimum color to mask out which is defined by the elements at even positions of the original array (considering the array as 0-indexed).
|
inline |
Checks if provided color is masked by the current mask because all its components are in the range defined by the min and max arrays of the mask.
color | is a color to check |
true
if check is valid (provided color has the expected number of components) and all color should be masked. Otherwise returns false
|
inline |
Creates a mask iText.Kernel.Pdf.PdfArray from provided object.