Mako 7.5.0 API
Loading...
Searching...
No Matches
IDOMColorSpace Class Referenceabstract

IDOMColorSpace interface. More...

#include <idomcolorspace.h>

Inheritance diagram for IDOMColorSpace:

Public Types

enum  eColorSpaceType {
  eDeviceRGB , eDeviceGray , eDeviceCMYK , esRGB ,
  esGray , escRGB , eICCBased , eIndexed ,
  eDeviceN , eLAB , eDeviceCMY , eNumColorSpaceTypes = 11
}
 Color spaces type enumeration. More...
 

Public Member Functions

virtual eColorSpaceType getColorSpaceType ()=0
 Retrieves the color space type.
 
virtual uint8 getNumComponents ()=0
 Retrieves the number of components that are in colors in this color space.
 
virtual bool getComponentsHaveSameRange ()=0
 Checks if this color space has the same range for all its components. Some color spaces (such as Lab and ICC) may not have the same range for all its components. If a color space does have the same range for all its components, you only need to call getComponentRange() once to find the range for all components.
 
virtual bool getComponentRange (int component, float &low, float &high)=0
 Retrieves the expected range of component values for a given channel, if applicable.
 
virtual eRenderingIntent getDefaultRenderingIntent ()=0
 Retrieves the default rendering intent for this color space.
 
virtual EDLRawString getColorantName (uint8 component) const =0
 Determine the colorant name for a colorant index. If a colorant name cannot be determined, an IEDLError with type EDL_ERR_NO_COLOR_NAME will be thrown. Cannot be called on Indexed or LAB color spaces. For device spaces and simple ICC color spaces, the basic process color name will be returned (ie one of Gray, Red, Green, Blue, Cyan, Magenta, Yellow, Black as appropriate).
 
virtual bool equals (const IDOMColorSpacePtr &colorSpace, bool exact=false)=0
 Determines if the given color space is equivalent to this color space.
 
virtual bool similar (const IDOMColorSpacePtr &colorSpace, eRenderingIntent intent, eBlackPointCompensation bpc)=0
 Determines if the given color space is very similar to this color space for the given rendering intent. Color spaces are tested via selective sampling and are considered similar if the samples show the same results to a 10 bit accuracy. This can be an expensive operation for complicated color spaces.
 
- Public Member Functions inherited from IEDLObject
virtual const CClassIDgetClassID () const =0
 Returns class ID of IEDLObject.
 
virtual bool init (CClassParams *pData)
 The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory.
 
virtual bool clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
 Create a copy of EDLObject.
 
- 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.
 
- Public Member Functions inherited from IDOMHashable
virtual ~IDOMHashable ()
 Virtual destructor.
 
virtual bool hash (uint64 &hash)=0
 Retrieve a hash for this object.
 
virtual uint64 hashE ()
 As hash(), but throws an exception if the operation fails.
 

Additional Inherited Members

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

Detailed Description

IDOMColorSpace interface.

A color space describes a range of colors appropriate to a given context. A device color space describes the range of colors that a camera can see, a printer can print, or a monitor can display, and is tied to the device it describes. Editing color spaces, on the other hand, such as Adobe RGB or sRGB, are device-independent, determining a color range you can work in. They are designed to be gray balanced, such that colors with equal amounts of red, green, and blue appear neutral, and allow you to edit images in a controlled, consistent manner. Editing spaces also are perceptually uniform; that is, changes to lightness, hue, or saturation are applied equally to all the colors in the image.

Instances of these objects may throw IEDLError exceptions on failure.

Member Function Documentation

◆ equals()

virtual bool IDOMColorSpace::equals ( const IDOMColorSpacePtr & colorSpace,
bool exact = false )
pure virtual

Determines if the given color space is equivalent to this color space.

Parameters
colorSpaceThe color space to compare with.
exactIf false, we consider spaces equivalent if their intercepted results are the same. For example, in the default Mako configuration, sRGB is the intercept space for DeviceRGB, and therefore if exact is false then sRGB is considered equivalent to DeviceRGB. Pass exact as true if we wish to treat these situations as non-equivalent.
Returns
bool True if equal, false otherwise.

◆ getColorantName()

virtual EDLRawString IDOMColorSpace::getColorantName ( uint8 component) const
pure virtual

Determine the colorant name for a colorant index. If a colorant name cannot be determined, an IEDLError with type EDL_ERR_NO_COLOR_NAME will be thrown. Cannot be called on Indexed or LAB color spaces. For device spaces and simple ICC color spaces, the basic process color name will be returned (ie one of Gray, Red, Green, Blue, Cyan, Magenta, Yellow, Black as appropriate).

Returns
EDLRawString On success, the colorant name.

◆ getColorSpaceType()

virtual eColorSpaceType IDOMColorSpace::getColorSpaceType ( )
pure virtual

Retrieves the color space type.

See also
eColorSpaceType
Returns
eColorSpaceType. Retrieves the color space type

◆ getComponentRange()

virtual bool IDOMColorSpace::getComponentRange ( int component,
float & low,
float & high )
pure virtual

Retrieves the expected range of component values for a given channel, if applicable.

Parameters
componentThe index of the component whose range is being queried
lowReference parameter to receive the low bound of the component's value range.
highReference parameter to receive the high bound of the component's value range.
Returns
bool Returns true if the given component has a range, false otherwise.

◆ getComponentsHaveSameRange()

virtual bool IDOMColorSpace::getComponentsHaveSameRange ( )
pure virtual

Checks if this color space has the same range for all its components. Some color spaces (such as Lab and ICC) may not have the same range for all its components. If a color space does have the same range for all its components, you only need to call getComponentRange() once to find the range for all components.

Returns
bool Returns true if all the components in the color space have the same range, false if they do not.

◆ getDefaultRenderingIntent()

virtual eRenderingIntent IDOMColorSpace::getDefaultRenderingIntent ( )
pure virtual

Retrieves the default rendering intent for this color space.

Returns
eRenderingIntent The default rendering intent.

◆ getNumComponents()

virtual uint8 IDOMColorSpace::getNumComponents ( )
pure virtual

Retrieves the number of components that are in colors in this color space.

Returns
uint8 The number of components for colors in this color space.

◆ similar()

virtual bool IDOMColorSpace::similar ( const IDOMColorSpacePtr & colorSpace,
eRenderingIntent intent,
eBlackPointCompensation bpc )
pure virtual

Determines if the given color space is very similar to this color space for the given rendering intent. Color spaces are tested via selective sampling and are considered similar if the samples show the same results to a 10 bit accuracy. This can be an expensive operation for complicated color spaces.

Parameters
colorSpaceThe color space to compare with.
intentThe rendering intent to use.
bpcThe black point compensation treatment. If in double, use eBPCDefault.
Returns
bool True if similar, false otherwise.

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