pdfOptimizer 1.0.1 API
iText.Pdfoptimizer.Handlers.ImageQualityOptimizer Class Reference

Looks for image streams and performs theirs optimization. More...

Inheritance diagram for iText.Pdfoptimizer.Handlers.ImageQualityOptimizer:
iText.Pdfoptimizer.AbstractOptimizationHandler

Public Member Functions

 ImageQualityOptimizer ()
 Creates an empty image quality optimizer. More...
 
 ImageQualityOptimizer (IDictionary< ImageType, IImageProcessor > processors)
 Creates a new image quality optimizer with custom configuration of image processors. More...
 
virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer SetJpegProcessor (IImageProcessor processor)
 Sets a processor for iText.IO.Image.ImageType.JPEG images. More...
 
virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer SetJpeg2000Processor (IImageProcessor processor)
 Sets a processor for iText.IO.Image.ImageType.JPEG2000 images. More...
 
virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer SetJBig2Processor (IImageProcessor processor)
 Sets a processor for iText.IO.Image.ImageType.JBIG2 images. More...
 
virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer SetTiffProcessor (IImageProcessor processor)
 Sets a processor for iText.IO.Image.ImageType.TIFF images. More...
 
virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer SetPngProcessor (IImageProcessor processor)
 Sets a processor for iText.IO.Image.ImageType.PNG images. More...
 
virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer SetPredicate (PdfImageXObjectPredicate predicate)
 Sets a search predicate. More...
 
virtual PdfImageXObjectPredicate GetPredicate ()
 Gets current search predicate. More...
 
virtual IDictionary< ImageType, IImageProcessorGetImageProcessors ()
 Gets a copy of current configuration of the image processor. More...
 

Detailed Description

Looks for image streams and performs theirs optimization.

Constructor & Destructor Documentation

◆ ImageQualityOptimizer() [1/2]

iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.ImageQualityOptimizer ( )
inline

Creates an empty image quality optimizer.

◆ ImageQualityOptimizer() [2/2]

iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.ImageQualityOptimizer ( IDictionary< ImageType, IImageProcessor processors)
inline

Creates a new image quality optimizer with custom configuration of image processors.

Creates a new image quality optimizer with custom configuration of image processors. Note that type of the image is identifying based on iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType() call.

Parameters
processorsis a map where image types are associated with processors for them
See also
iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType()

Member Function Documentation

◆ GetImageProcessors()

virtual IDictionary<ImageType, IImageProcessor> iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.GetImageProcessors ( )
inlinevirtual

Gets a copy of current configuration of the image processor.

Returns
a map where iText.IO.Image.ImageType keys are associated with actual iText.Pdfoptimizer.Handlers.Imagequality.Processors.IImageProcessor

◆ GetPredicate()

virtual PdfImageXObjectPredicate iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.GetPredicate ( )
inlinevirtual

Gets current search predicate.

Gets current search predicate. If it was not set return default implementation.

Returns
search predicate.

◆ SetJBig2Processor()

virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.SetJBig2Processor ( IImageProcessor  processor)
inlinevirtual

Sets a processor for iText.IO.Image.ImageType.JBIG2 images.

Sets a processor for iText.IO.Image.ImageType.JBIG2 images. Note that type of the image is identifying based on iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType() call.

Parameters
processoris an image processor to set
Returns
this instance
See also
iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType()

◆ SetJpeg2000Processor()

virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.SetJpeg2000Processor ( IImageProcessor  processor)
inlinevirtual

Sets a processor for iText.IO.Image.ImageType.JPEG2000 images.

Sets a processor for iText.IO.Image.ImageType.JPEG2000 images. Note that type of the image is identifying based on iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType() call.

Parameters
processoris an image processor to set
Returns
this instance
See also
iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType()

◆ SetJpegProcessor()

virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.SetJpegProcessor ( IImageProcessor  processor)
inlinevirtual

Sets a processor for iText.IO.Image.ImageType.JPEG images.

Sets a processor for iText.IO.Image.ImageType.JPEG images. Note that type of the image is identifying based on iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType() call.

Parameters
processoris an image processor to set
Returns
this instance
See also
iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType()

◆ SetPngProcessor()

virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.SetPngProcessor ( IImageProcessor  processor)
inlinevirtual

Sets a processor for iText.IO.Image.ImageType.PNG images.

Sets a processor for iText.IO.Image.ImageType.PNG images. Note that type of the image is identifying based on iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType() call.

Parameters
processoris an image processor to set
Returns
this instance
See also
iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType()

◆ SetPredicate()

virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.SetPredicate ( PdfImageXObjectPredicate  predicate)
inlinevirtual

Sets a search predicate.

Sets a search predicate. Allows to provide custom implementation of iText.Pdfoptimizer.Handlers.Util.PdfImageXObjectPredicate with overridden method iText.Pdfoptimizer.Handlers.Util.PdfImageXObjectPredicate.CustomCondition(iText.Kernel.Pdf.PdfObject) to skip some types of images during optimization process.

Parameters
predicateis a predicate to set
Returns
this instance

◆ SetTiffProcessor()

virtual iText.Pdfoptimizer.Handlers.ImageQualityOptimizer iText.Pdfoptimizer.Handlers.ImageQualityOptimizer.SetTiffProcessor ( IImageProcessor  processor)
inlinevirtual

Sets a processor for iText.IO.Image.ImageType.TIFF images.

Sets a processor for iText.IO.Image.ImageType.TIFF images. Note that type of the image is identifying based on iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType() call.

Parameters
processoris an image processor to set
Returns
this instance
See also
iText.Kernel.Pdf.Xobject.PdfImageXObject.IdentifyImageType()