Mako 8.1.0 API
Loading...
Searching...
No Matches
JawsMako::IImageDownsamplerTransform Class Referenceabstract

A transform for downsampling images above a given effective resolution to a desired target effective resolution. More...

#include <transforms.h>

Inheritance diagram for JawsMako::IImageDownsamplerTransform:

Public Member Functions

virtual void setColorDownsamplingMethod (IDOMImageDownsamplerFilter::eDownsamplingMethod method)=0
 Set the desired downsampling method for color images. The default is bicubic.
 
virtual IDOMImageDownsamplerFilter::eDownsamplingMethod getColorDownsamplingMethod () const =0
 Get the downsampling method to be used for color images.
 
virtual void setGrayDownsamplingMethod (IDOMImageDownsamplerFilter::eDownsamplingMethod method)=0
 Set the desired downsampling method for gray images The default is bicubic.
 
virtual IDOMImageDownsamplerFilter::eDownsamplingMethod getGrayDownsamplingMethod () const =0
 Get the downsampling method to be used for gray images.
 
virtual void setMonoDownsamplingMethod (IDOMImageDownsamplerFilter::eDownsamplingMethod method)=0
 Set the desired downsampling method for monochrome images. The default is subsample.
 
virtual IDOMImageDownsamplerFilter::eDownsamplingMethod getMonoDownsamplingMethod () const =0
 Get the downsampling method to be used for mono images.
 
virtual void setTargetResolution (float resolution)=0
 Set a blanket target resolution (dpi) for downsampling all images. This will also set the threshold resolution to the same value.
 
virtual void setThresholdResolution (float resolution)=0
 Set a blanket threshold resolution (dpi) for downsampling all images. Only images with an effective resolution of at least this value will be downsampled.
 
virtual void setColorTargetResolution (float resolution)=0
 Set a target resolution (dpi) for downsampling color images. This will also set the threshold resolution to the same value. Setting this to 0.0 will result in no downsampling for this image type. The default is 0.0.
 
virtual float getColorTargetResolution ()=0
 Get the target resolution (dpi) for downsampling color images.
 
virtual void setColorThresholdResolution (float resolution)=0
 Set a threshold resolution (dpi) for downsampling color images. Only images with an effective resolution of at least this value will be downsampled.
 
virtual float getColorThresholdResolution ()=0
 Get the threshold resolution (dpi) for downsampling color images.
 
virtual void setGrayTargetResolution (float resolution)=0
 Set a target resolution (dpi) for downsampling gray images. This will also set the threshold resolution to the same value. The default is 300dpi. Setting this to 0.0 will result in no downsampling for this image type. The default is 0.0.
 
virtual float getGrayTargetResolution ()=0
 Get the target resolution (dpi) for downsampling gray images.
 
virtual void setGrayThresholdResolution (float resolution)=0
 Set a threshold resolution (dpi) for downsampling gray images. Only images with an effective resolution of at least this value will be downsampled.
 
virtual float getGrayThresholdResolution ()=0
 Get the threshold resolution (dpi) for downsampling gray images.
 
virtual void setMonoTargetResolution (float resolution)=0
 Set a target resolution (dpi) for downsampling monochrome images. This will also set the threshold resolution to the same value. The default is 1200dpi. Setting this to 0.0 will result in no downsampling for this image type. The default is 0.0.
 
virtual float getMonoTargetResolution ()=0
 Get the target resolution (dpi) for downsampling mono images.
 
virtual void setMonoThresholdResolution (float resolution)=0
 Set a threshold resolution (dpi) for downsampling monochrome images. Only images with an effective resolution of at least this value will be downsampled.
 
virtual float getMonoThresholdResolution ()=0
 Get the threshold resolution (dpi) for downsampling mono images.
 
virtual void setDownsampleMaskedImages (bool downsampleMaskedImages)=0
 Set whether to downsample masked images.
 
virtual void setUseMaskResolutionForMaskedImages (bool useMaskResolutionSettingForMaskedImages)=0
 Set whether or not the mask resolution setting should be applied to the image portion of a masked image.
 
virtual void setUseFloatingPointResolutions (bool useFloatingPointResolutions)=0
 Set whether or not to force final images to have integer resolutions.
 
- Public Member Functions inherited from JawsMako::ITransform
virtual IDOMBrushPtr transform (const IDOMBrushPtr &brush, eBrushUsage usage=eBUGeneral, const CTransformState &state=CTransformState())=0
 Apply the transform to the given brush, if applicable. These transforms are thread safe.
 
virtual IDOMImagePtr transform (const IDOMImagePtr &image, const CTransformState &state=CTransformState())=0
 Apply the transform to the given image, if applicable. These transforms are thread safe.
 
virtual IDOMColorPtr transform (const IDOMColorPtr &color, const CTransformState &state=CTransformState())=0
 Apply the transform to the given color, if applicable. These transforms are thread safe.
 
virtual IDOMColorSpacePtr transform (const IDOMColorSpacePtr &colorSpace, const CTransformState &state=CTransformState())=0
 Apply the transform to the given colorspace, if applicable. These transforms are thread safe.
 
virtual IDOMNodePtr transform (const IDOMNodePtr &node, bool &changed, bool transformChildren=true, const CTransformState &state=CTransformState())=0
 Apply the transform to the given node, if applicable. These transforms are thread safe, providing no other transforms are being applied to the same nodes at the same time.
 
virtual void transformPage (const IPagePtr &page, bool transformContent=true, bool transformAnnotations=true)=0
 Apply the transform to the given page, if applicable. These transforms are thread safe, providing no other transforms are being applied to the same nodes at the same time. The transform will also apply to the annotations appearances.
 
virtual void flushCaches ()=0
 Flush the caches used by the transform. Most transforms cache recently transformed results to improve the performance of repeated transformations of equivalent results. However, it is possible that some cached results may point to entities that no longer exist, such as content inside an XPS file that no longer exists. If you are deleting or replacing files where transforms have been used, it is advisable to invoke this routine to clear the caches.
 
virtual void setProgressMonitor (const IProgressMonitorPtr &progressMonitor)=0
 Set the IProgressMonitor object for this transform to allow for monitoring the progress of the transform.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API IImageDownsamplerTransformPtr create (const IJawsMakoPtr &jawsMako, const IAbortPtr &abort=IAbortPtr())
 Create the transform.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

A transform for downsampling images above a given effective resolution to a desired target effective resolution.

Member Function Documentation

◆ create()

static JAWSMAKO_API IImageDownsamplerTransformPtr JawsMako::IImageDownsamplerTransform::create ( const IJawsMakoPtr & jawsMako,
const IAbortPtr & abort = IAbortPtr() )
static

Create the transform.

Parameters
jawsMakoThe JawsMako instance.
abortAn abort callback handler.
Returns
IImageDownsamplerTransformPtr The new instance.

◆ getColorDownsamplingMethod()

virtual IDOMImageDownsamplerFilter::eDownsamplingMethod JawsMako::IImageDownsamplerTransform::getColorDownsamplingMethod ( ) const
pure virtual

Get the downsampling method to be used for color images.

Returns
IDOMImageDownsamplerFilter::eDownsamplingMethod The downsampling method for color images.

◆ getColorTargetResolution()

virtual float JawsMako::IImageDownsamplerTransform::getColorTargetResolution ( )
pure virtual

Get the target resolution (dpi) for downsampling color images.

Returns
float The target resolution, in dpi

◆ getColorThresholdResolution()

virtual float JawsMako::IImageDownsamplerTransform::getColorThresholdResolution ( )
pure virtual

Get the threshold resolution (dpi) for downsampling color images.

Returns
float The threshold resolution, in dpi

◆ getGrayDownsamplingMethod()

virtual IDOMImageDownsamplerFilter::eDownsamplingMethod JawsMako::IImageDownsamplerTransform::getGrayDownsamplingMethod ( ) const
pure virtual

Get the downsampling method to be used for gray images.

Returns
IDOMImageDownsamplerFilter::eDownsamplingMethod The downsampling method for gray images.

◆ getGrayTargetResolution()

virtual float JawsMako::IImageDownsamplerTransform::getGrayTargetResolution ( )
pure virtual

Get the target resolution (dpi) for downsampling gray images.

Returns
float The target resolution, in dpi

◆ getGrayThresholdResolution()

virtual float JawsMako::IImageDownsamplerTransform::getGrayThresholdResolution ( )
pure virtual

Get the threshold resolution (dpi) for downsampling gray images.

Returns
float The threshold resolution, in dpi

◆ getMonoDownsamplingMethod()

virtual IDOMImageDownsamplerFilter::eDownsamplingMethod JawsMako::IImageDownsamplerTransform::getMonoDownsamplingMethod ( ) const
pure virtual

Get the downsampling method to be used for mono images.

Returns
IDOMImageDownsamplerFilter::eDownsamplingMethod The downsampling method for monochrome images.

◆ getMonoTargetResolution()

virtual float JawsMako::IImageDownsamplerTransform::getMonoTargetResolution ( )
pure virtual

Get the target resolution (dpi) for downsampling mono images.

Returns
float The target resolution, in dpi

◆ getMonoThresholdResolution()

virtual float JawsMako::IImageDownsamplerTransform::getMonoThresholdResolution ( )
pure virtual

Get the threshold resolution (dpi) for downsampling mono images.

Returns
float The threshold resolution, in dpi

◆ setColorDownsamplingMethod()

virtual void JawsMako::IImageDownsamplerTransform::setColorDownsamplingMethod ( IDOMImageDownsamplerFilter::eDownsamplingMethod method)
pure virtual

Set the desired downsampling method for color images. The default is bicubic.

Parameters
methodThe downsampling method to apply.

◆ setColorTargetResolution()

virtual void JawsMako::IImageDownsamplerTransform::setColorTargetResolution ( float resolution)
pure virtual

Set a target resolution (dpi) for downsampling color images. This will also set the threshold resolution to the same value. Setting this to 0.0 will result in no downsampling for this image type. The default is 0.0.

Parameters
resolutionThe target resolution, in dpi.

◆ setColorThresholdResolution()

virtual void JawsMako::IImageDownsamplerTransform::setColorThresholdResolution ( float resolution)
pure virtual

Set a threshold resolution (dpi) for downsampling color images. Only images with an effective resolution of at least this value will be downsampled.

Parameters
resolutionThe threshold resolution, in dpi.

◆ setDownsampleMaskedImages()

virtual void JawsMako::IImageDownsamplerTransform::setDownsampleMaskedImages ( bool downsampleMaskedImages)
pure virtual

Set whether to downsample masked images.

This applies to cases where an image is masked by a separate masked image, such as types of PDF masked or soft-masked images. These are represented in the DOM using IDOMMaskedBrush, where the sub-brush is an image.

The default is true.

Parameters
downsampleMaskedImagesTrue or False

◆ setGrayDownsamplingMethod()

virtual void JawsMako::IImageDownsamplerTransform::setGrayDownsamplingMethod ( IDOMImageDownsamplerFilter::eDownsamplingMethod method)
pure virtual

Set the desired downsampling method for gray images The default is bicubic.

Parameters
methodThe downsampling method to apply.

◆ setGrayTargetResolution()

virtual void JawsMako::IImageDownsamplerTransform::setGrayTargetResolution ( float resolution)
pure virtual

Set a target resolution (dpi) for downsampling gray images. This will also set the threshold resolution to the same value. The default is 300dpi. Setting this to 0.0 will result in no downsampling for this image type. The default is 0.0.

Parameters
resolutionThe target resolution, in dpi.

◆ setGrayThresholdResolution()

virtual void JawsMako::IImageDownsamplerTransform::setGrayThresholdResolution ( float resolution)
pure virtual

Set a threshold resolution (dpi) for downsampling gray images. Only images with an effective resolution of at least this value will be downsampled.

Parameters
resolutionThe threshold resolution, in dpi.

◆ setMonoDownsamplingMethod()

virtual void JawsMako::IImageDownsamplerTransform::setMonoDownsamplingMethod ( IDOMImageDownsamplerFilter::eDownsamplingMethod method)
pure virtual

Set the desired downsampling method for monochrome images. The default is subsample.

Note
Using any other method other than subsampling for monochrome images will result in grayscale output.
Parameters
methodThe downsampling method to apply.

◆ setMonoTargetResolution()

virtual void JawsMako::IImageDownsamplerTransform::setMonoTargetResolution ( float resolution)
pure virtual

Set a target resolution (dpi) for downsampling monochrome images. This will also set the threshold resolution to the same value. The default is 1200dpi. Setting this to 0.0 will result in no downsampling for this image type. The default is 0.0.

Parameters
resolutionThe target resolution, in dpi.

◆ setMonoThresholdResolution()

virtual void JawsMako::IImageDownsamplerTransform::setMonoThresholdResolution ( float resolution)
pure virtual

Set a threshold resolution (dpi) for downsampling monochrome images. Only images with an effective resolution of at least this value will be downsampled.

Parameters
resolutionThe threshold resolution, in dpi.

◆ setTargetResolution()

virtual void JawsMako::IImageDownsamplerTransform::setTargetResolution ( float resolution)
pure virtual

Set a blanket target resolution (dpi) for downsampling all images. This will also set the threshold resolution to the same value.

Parameters
resolutionThe downsampling resolution in dpi.

◆ setThresholdResolution()

virtual void JawsMako::IImageDownsamplerTransform::setThresholdResolution ( float resolution)
pure virtual

Set a blanket threshold resolution (dpi) for downsampling all images. Only images with an effective resolution of at least this value will be downsampled.

Parameters
resolutionThe threshold resolution, in dpi.

◆ setUseFloatingPointResolutions()

virtual void JawsMako::IImageDownsamplerTransform::setUseFloatingPointResolutions ( bool useFloatingPointResolutions)
pure virtual

Set whether or not to force final images to have integer resolutions.

For historical reasons, the default is false.

Not all image formats can store floating point resolutions, and as such the transform can emit integer resolutions to prevent scaling issues for PDLs or formats where this is not supported.

Setting this to true will result in the use of floating point resolutions, and should be used with care. However, for formats such as PDF where fractional dpi settings are supported, doing so may result in an effective dpi setting for the downsampled image that is closer to the desired result.

Note
The resolution that is set in the images is not normally the requested resolution, as the requested resolution is relative to the page, while the image resolution is local to the image and will be set based on how each image is scaled.
Parameters
useFloatingPointResolutionsTrue or False

◆ setUseMaskResolutionForMaskedImages()

virtual void JawsMako::IImageDownsamplerTransform::setUseMaskResolutionForMaskedImages ( bool useMaskResolutionSettingForMaskedImages)
pure virtual

Set whether or not the mask resolution setting should be applied to the image portion of a masked image.

This applies to cases where an image is masked by a separate masked image, such as types of PDF masked or soft-masked images. These are represented in the DOM using IDOMMaskedBrush, where the sub-brush is an image.

If false, then the mask and the image are evaluated separately and a downsampling resolution and threshold are chosen. For the mask, this is normally either grayscale or monochrome. The image data can be anything. In this mode it is possible for the downsampled image and mask to be downsampled to different resolutions.

If true, then whatever target resolution and threshold is applied to the mask will also be applied to the image samples. If these images have the same effective resolution before downsampling, then they will also share the same effective resolution after downsampling.

The default is false.

Parameters
useMaskResolutionSettingForMaskedImagesTrue or False

The documentation for this class was generated from the following file: