Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::IColorConverterTransform Class Referenceabstract

A transform for color conversion, converting all appropriate DOM contents to a desired target color space. More...

#include <transforms.h>

Inheritance diagram for JawsMako::IColorConverterTransform:

Public Member Functions

virtual void setTargetSpace (const IDOMColorSpacePtr &targetSpace)=0
 Set the desired target space for conversion. The default is DeviceRGB. Indexed or DeviceN color spaces cannot be used as a target space.
 
virtual IDOMColorSpacePtr getTargetSpace ()=0
 Get the target space for conversion.
 
virtual void setTargetProfile (const IDOMICCProfilePtr &profile)=0
 Set the desired target space using an ICC profile.
 
virtual void setSWOPTargetSpace ()=0
 Set the desired target space to the default SWOP color profile.
 
virtual void setOverrideRenderingIntent (eRenderingIntent intent)=0
 Sets an override rendering intent. By default this is not set. If set, this intent is used instead of any DOM resident information.
 
virtual void useDOMRenderingIntents (bool use)=0
 Set whether or not to use explicit rendering intents in the DOM when performing conversion. The PDF input for example can set explicit rendering intents for individual nodes in the DOM, and these will be ignored if this property is set to false. The default is true; that is to honour the explicit rendering intent information in the DOM. This is ignored if an overriding rendering intent has been set by setOverrideRenderingIntent();.
 
virtual void setBlackPreservation (bool preserveForText, bool preserveForOther)=0
 Enable/control 100% black preservation.
 
virtual void setConvertOnlyDeviceIndependentColors (bool convert)=0
 Sets whether or not only device-independent colors should be converted. Useful for cases where device independent color spaces are not allowed, or will not produce reliable results. The default is false.
 
virtual void setConvertIndependentToSimilarDeviceSpace (bool convert)=0
 If setConvertOnlyDeviceIndependentColors() has been set to true, this controls the conversion behaviour for affected spaces. If set to true, the converter will convert to the most "similar" Device space; for example 3 channel colors will be converted to DeviceRGB and so forth. If false, the target space will be used. The default is false.
 
virtual void setInspectDeviceNAlternateSpace (bool inspect)=0
 If setShouldConvertForSpaceType() sets IDOMColorSpace::eDeviceN to false then normally it will not do color conversion. However if setInspectDeviceNAlternateSpace(true) was invoked then the alternate colorspace is also inspected to see if it will trigger a color conversion. The default is false.
 
virtual void setInspectDeviceNColorantsAlternateSpace (bool inspect)=0
 If setInspectDeviceNAlternateSpace() is true and applies, and this parameter is set to true, then the alternate colorspace(s) in any colorant(s) (if present) are all inspected to see if they would trigger a color conversion. If false, the colorant(s) colorspace(s) are not inspected. The default is true.
 
virtual void setKeepDeviceN (bool keep)=0
 If a DeviceN color results in a color conversion into the target space, setting this to true results in reencapsulating the transformed color into a DeviceN color. The original colorant names are reused but the alternate colorspace is now the target colorspace. This is not possible for multitone DeviceN color spaces in which case this setting will be ignored. The default is false.
 
virtual void setIgnoreImagesWithSimilarColorSpaces (bool ignore)=0
 Sets whether or not images can be ignored if their color space is deemed to be similar to the target space (see IDOMColorSpace::similar() for details about the similarity test). This is useful to avoiding needing to be re-encode images in some situations. The default is false.
 
virtual void setIgnoreRenderedImages (bool ignore)=0
 Sets whether or not images can be ignored if they are the result of the IRendererTransform. Typically such images are already converted to an eventual target space, and as such should not be transformed, particularly to any page group color space. The default is false.
 
virtual void setForceImageSampleConversion (bool force)=0
 Sets whether or not color conversion of image samples should be forced, even for cases where the source image color space is considered similar to the target space. The default is false; that is, if an image's color space is similar to the target then the individual color samples will not be color converted. In both cases the target color space will be applied to the resulting image.
 
virtual void setShouldConvertForSpaceType (IDOMColorSpace::eColorSpaceType type, bool convert=true)=0
 Set whether or not objects using a certain color space type should be converted. The default for all is true, although use of setConvertOnlyDeviceIndependentColors() and setInspectDeviceNAlternateSpace() may affect this.
 
virtual bool wouldConvertForSpaceType (IDOMColorSpace::eColorSpaceType type)=0
 Get whether or not objects using a certain color space type would be converted.
 
virtual void setConvertICCColorsWithNumComponents (uint8 numComponents, bool convert=true)=0
 Set whether objects with ICC color spaces with the given number of components should be converted. The default is true for all. numComponents is from 1 to EDL_CMM_MAX_COMPONENTS Calling setShouldConvertForSpaceType(IDOMColorSpace::eICCBased, true) however will cause all possibilities to be true. Likewise calling setShouldConvertForSpaceType(IDOMColorSpace::eICCBased, false) will cause all possibilities to be false.
 
virtual void setConvertICCSpacesWithProfileVersionGreaterThan (uint8 majorVersion, uint8 minorVersion)=0
 Set the maximum allowed version of ICC Profiles allowed. Anything with a higher version will be converted to the target space. The default is 0.0, which disables this feature.
 
virtual void setConvertColorsInsideLuminositySoftMasks (bool convert=true)=0
 Set whether the contents of Luminosity Soft Masks should be converted or not.
 
virtual void setConvertThroughTransparencyGroupColorSpaces (bool useGroups=true)=0
 Set whether or not the page group and isolated transparency group color spaces should be used when converting.
 
virtual void setKeepOverprintMode (bool keep=true)=0
 Set whether or not to drop the overprint mode when converting color spaces.
 
virtual void setDeviceNHandling (bool convertProcess=true, bool mergeSpots=true, const IDOMColorSpaceDeviceN::CColorantInfoVect &spotsToMerge=IDOMColorSpaceDeviceN::CColorantInfoVect(), const CSpotColorNames &spotsToRetain=CSpotColorNames(), const CSpotColorNames &spotsToDrop=CSpotColorNames(), bool knockoutDroppedSpots=true)=0
 Control handling of DeviceN color spaces.
 
- 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 IColorConverterTransformPtr 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 color conversion, converting all appropriate DOM contents to a desired target color space.

Conversion for individual color space types can be enabled or disabled. This is useful for example for consumers who only support a subset of the JawsMako supported color space set.

When handling objects using indexed color spaces, instances of this transform may opt to use a modified indexed color space rather than actually convert the underlying color. This is usually much faster. An IComplexColorSimplifierTransform can be applied after this transform if required.

Member Function Documentation

◆ create()

static JAWSMAKO_API IColorConverterTransformPtr JawsMako::IColorConverterTransform::create ( const IJawsMakoPtr & jawsMako,
const IAbortPtr & abort = IAbortPtr() )
static

Create the transform.

Parameters
jawsMakoThe JawsMako instance.
Returns
The new instance.

◆ setBlackPreservation()

virtual void JawsMako::IColorConverterTransform::setBlackPreservation ( bool preserveForText,
bool preserveForOther )
pure virtual

Enable/control 100% black preservation.

    100% black preservation preserves a 100% black output when color
    converting when enabled for certain solid colors.

    A 100% black object is an object painted with one of the following
    colors:

    - 0 0 0 1 in any CMYK color space (including ICC)
    - 0 0 0 in any RGB color space (including ICC)
    - 0 in any Gray colorspace (including ICC)
    - 1 in a single channel DeviceN (aka Separation) Black color space
    - 1 in a multi-channel DeviceN colorspace where only the Black channel
      is set.

    If black preservation applies then the resulting color will be either
    (depending on the target color space):

    - c m y 1 in any CMYK colorspace (including ICC)
    - 0 0 0 in any RGB colorspace (including ICC)
    - 0 in any Gray colorspace (including ICC)

    Note that the CMY values in a CMYK result may not be zero if color
    managed white conversion would not produce pure white.

    Note also that where transparency is involved this conversion only
    applies when converting to the blending colorspace, and has no
    further effect for further conversions.

    May be enabled separately for text and vector art. Applies to only
    solid color brushes (IDOMSolidColorBrush) and uncolored tiling
    patterns only.

    The default is set by #IColorManager::setDefaultBlackPreservation(),
    which defaults to false, false. The default is applied at the time
    of transform creation.
Parameters
preserveForTextWhether or not to apply black preservation for text.
preserveForOtherWhether or not to apply for non-text objects.

◆ setConvertColorsInsideLuminositySoftMasks()

virtual void JawsMako::IColorConverterTransform::setConvertColorsInsideLuminositySoftMasks ( bool convert = true)
pure virtual

Set whether the contents of Luminosity Soft Masks should be converted or not.

   The default is true.

   Luminosity soft masks use the luminosity of the contents of a soft mask to
   generate the opacity that is applied to the objects being masked. If the
   colors inside such a soft mask are converted to a different color space,
   then this will affect the calculation of the opacity, and potentially
   undesirable results in some contexts.

◆ setConvertThroughTransparencyGroupColorSpaces()

virtual void JawsMako::IColorConverterTransform::setConvertThroughTransparencyGroupColorSpaces ( bool useGroups = true)
pure virtual

Set whether or not the page group and isolated transparency group color spaces should be used when converting.

The default is true. That is, if a color is to be converted, it will be converted through the chain of enclosing transparency group color spaces before final conversion to the target space. If a page group with a colorspace is present however it will only be used if transparency is present (or if transparency was present and has been flattened).

When false, the page group and isolated transparency group color spaces are ignored.

◆ setDeviceNHandling()

virtual void JawsMako::IColorConverterTransform::setDeviceNHandling ( bool convertProcess = true,
bool mergeSpots = true,
const IDOMColorSpaceDeviceN::CColorantInfoVect & spotsToMerge = IDOMColorSpaceDeviceN::CColorantInfoVect(),
const CSpotColorNames & spotsToRetain = CSpotColorNames(),
const CSpotColorNames & spotsToDrop = CSpotColorNames(),
bool knockoutDroppedSpots = true )
pure virtual

Control handling of DeviceN color spaces.

    This API allows the following handling for objects in a DeviceN color space
    (or a combination thereof).

    - Merging of one or more spot components into the output process color space.
      If a spot is to be merged, the spot will be merged using a transparency-like
      blending method.
    - The dropping of one or more spot components entirely.
    - Color conversion of process components while retaining a DeviceN process.

    If enabled, any other DeviceN handling directions provided to this transform
    (such as #setKeepDeviceN, #setShouldConvertForSpaceType(IDOMColorSpace::eDeviceN)
    will be ignored, with the exception of DeviceN color spaces that are detected
    as multitone (eg special Duotone color spaces).

    Currently, this feature is only compatible with CMYK target color spaces.
    An error will result should a non-CMYK target color space be used with this
    feature enabled.

    If a DeviceN object requires processing, any /None colorants are dropped,
    and any /All colorants are preserved in order to preserve their special
    behavior.

    The default is off for all features.
Parameters
convertProcessIgnored if mergeSpots is true (where process components will always be converted if present). This parameter exists for the use case where no spots are required to be merged or dropped, but where the process components must be color converted.
mergeSpotsIf false, no spots will be merged (and #spotsToMerge is ignored).
spotsToMergeThe spots to merge. Consulted only if #mergeSpots is true. If empty, all spots will be merged unless they are explicitly dropped or retained, and the color of each component will be determined using a best effort method from the DeviceN color space of the content being processed. If non-empty, then the given spots are merged into the process components. The components in the info structures must use the same color space as the target color space.
spotsToRetainThe names of colorants to retain even if they are subject to mergeSpots and/or spotsToMerge.
spotsToDropThe names of colorants to drop entirely. If not provided, no spot components will be dropped.
knockoutDroppedSpotsControls behaviour if a non-overprinting object is being dropped due to all its components being dropped. Consider for example, an item being painted with only the spot component "Taupe" and "Taupe" is specified in the spotsToDrop list. If this object were to be dropped entirely, then the objects underneath would not be knocked out as expected. If knockoutDroppedSpots is true, the dropped brush is replaced with white in order to preserve this knockout behaviour.

◆ setKeepOverprintMode()

virtual void JawsMako::IColorConverterTransform::setKeepOverprintMode ( bool keep = true)
pure virtual

Set whether or not to drop the overprint mode when converting color spaces.

    The default is true, which will preserve the overprint mode when converting.

◆ setTargetProfile()

virtual void JawsMako::IColorConverterTransform::setTargetProfile ( const IDOMICCProfilePtr & profile)
pure virtual

Set the desired target space using an ICC profile.

Parameters
profileThe ICC profile to use.

◆ setTargetSpace()

virtual void JawsMako::IColorConverterTransform::setTargetSpace ( const IDOMColorSpacePtr & targetSpace)
pure virtual

Set the desired target space for conversion. The default is DeviceRGB. Indexed or DeviceN color spaces cannot be used as a target space.

Parameters
targetSpaceThe target color space to be used.

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