Mako 9.0.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
IDOMPWGImage Class Referenceabstract

Interface to a class representing a PWG image. More...

#include <edl/idomimageresource.h>

Inheritance diagram for IDOMPWGImage:
[legend]

Classes

class  Data
 Initialization data. More...

Public Member Functions

virtual uint16 getImageIndex () const =0
 Get the image index of this PWG image to use.
Public Member Functions inherited from IDOMImage
virtual IImageDecoderPtr createImageDecoder (IEDLClassFactory *factory, const IDOMImagePropertiesPtr &imageProperties)=0
 Creates a properly initialized image decoder object that reads from an inputstream that is specific to that image format.
virtual IImageFramePtr getImageFrame (IEDLClassFactory *factory)
 Fetch the image frame; convenience.
virtual IImageEncoderPtr createImageEncoder (const ISessionPtr &session, const IOutputStreamPtr &imageDest, const IDOMImagePropertiesPtr &imageProperties)=0
 Creates a properly initialized image encoder object that writes to an outputstream that is specific to that image format.
virtual IDOMImagePropertiesPtr getImageProperties ()=0
 Returns an object that stores the properties for this image object. The properties can then be inspected (or more added) by clients that need to manipulate the image resource.
virtual eDOMImageType getImageType ()=0
 Retrieves the image type.
virtual bool getIsRendered ()=0
 Determine if the image is as a result of rendering. This is indicated if the image type is eDITRendered or if the image explicitly notes this is the case (such as for IDOMPDFImage).
virtual IDOMImagePtr getImageWithSubstitutedColorSpace (IEDLClassFactory *factory, const IDOMColorSpacePtr &colorSpace)
 Obtain an image that is the same as this image, but with the colorspace substituted for another.
Public Member Functions inherited from IDOMResource
virtual IInputStreamPtr getStream () const =0
 Retrieves the resource stream.
virtual void setStream (const IInputStreamPtr &stream)=0
 Sets the resource stream for the node.
virtual uint64 getStreamLength () const =0
 Retrieves the stream length, if it is available.
virtual const EDLSysStringgetUri () const =0
 Retrieves the resource URI.
virtual void setUri (const EDLSysString &uri)=0
 Sets the resource URI.
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.

Static Public Member Functions

static const CClassIDclassID ()
 Retrieves class id of IDOMPWGImage.
static EDL_API IDOMPWGImagePtr create (IEDLClassFactory *pFactory, const IInputStreamPtr &stream, uint16 imageIndex=0)
 Create a pwg image resource with the given stream.
static EDL_API IDOMImagePtr createWriterAndImage (const ISessionPtr &session, IImageFrameWriterPtr &frame, const IDOMColorSpacePtr &colorSpace, uint32 width, uint32 height, uint8 bitsPerComponent=8, double xResolution=96.0, double yResolution=96.0, bool writeSignature=false, const IInputStreamPtr &inStream=IInputStreamPtr(), const IOutputStreamPtr &outStream=IOutputStreamPtr())
 Create an IDOMPWGImage and frame that can be used to populate same.
static EDL_API void encode (const ISessionPtr &pSession, const IDOMImagePtr &image, const IOutputStreamPtr &stream, bool writeSignature=false)
 Encode an image as a PWG stream, returning the stream. This routine may convert the image samples into a form that may be encoded as a PWG raster if required, such as by converting to a supported color space.
static EDL_API void encode (const ISessionPtr &pSession, const IImageFramePtr &frame, const IOutputStreamPtr &stream, bool writeSignature=false)
 Encode the contents of an IImageFrame as a PWG stream, returning the stream. This routine may convert the image samples into a form that may be encoded as TIFF if required, such as by converting to a supported color space.

Additional Inherited Members

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

Detailed Description

Interface to a class representing a PWG image.

Member Function Documentation

◆ classID()

const CClassID & IDOMPWGImage::classID ( )
inlinestatic

Retrieves class id of IDOMPWGImage.

Returns
CClassID Class id of the element.

◆ create()

EDL_API IDOMPWGImagePtr IDOMPWGImage::create ( IEDLClassFactory * pFactory,
const IInputStreamPtr & stream,
uint16 imageIndex = 0 )
static

Create a pwg image resource with the given stream.

Parameters
pFactoryThe EDL Class factory to use.
streamThe stream containing the raw image.
imageIndexFor multi-image PWG files, the index of the image to use, with 0 being the first image in the PWG file.

◆ createWriterAndImage()

EDL_API IDOMImagePtr IDOMPWGImage::createWriterAndImage ( const ISessionPtr & session,
IImageFrameWriterPtr & frame,
const IDOMColorSpacePtr & colorSpace,
uint32 width,
uint32 height,
uint8 bitsPerComponent = 8,
double xResolution = 96.0,
double yResolution = 96.0,
bool writeSignature = false,
const IInputStreamPtr & inStream = IInputStreamPtr(),
const IOutputStreamPtr & outStream = IOutputStreamPtr() )
static

Create an IDOMPWGImage and frame that can be used to populate same.

Parameters
sessionThe session to use.
frameOn exit, this is populated with a frame ready to receive image data via frame->writeScanLine(). Use frame->flushData() to complete the encoding process.
colorSpaceThe color space to use. Valid colorspaces for IDOMPWGImage are DeviceGray, DeviceRGB, and DeviceCMYK.
widthThe width of the image, in pixels.
heightThe height of the image, in pixels.
bitsPerComponentThe bits per component to use. 1, 8, and 16 bits per sample are supported. Only DeviceGray colorspace supports 1 bit per sample.
xResolutionThe x resolution, in pixels-per-inch.
yResolutionThe y resolution, in pixels-per-inch.
writeSignatureOptional. If true then it writes the PwgRaster document signature to the output stream before the first PWG raster image. The default value is false.
inStreamOptional. The first in a pair of streams used to read and write the raw image data if an external stream is desired. If NULL, a temporary store stream will be created. If non NULL, outStream must also be provided.
outStreamOptional. The second in a pair of streams used to read and write the raw image data if an external stream is desired. If NULL, a temporary store stream will be created. If non NULL, inStream must also be provided.
Returns
IDOMImagePtr The resulting image. Not valid until the frame is flushed.

◆ encode() [1/2]

EDL_API void IDOMPWGImage::encode ( const ISessionPtr & pSession,
const IDOMImagePtr & image,
const IOutputStreamPtr & stream,
bool writeSignature = false )
static

Encode an image as a PWG stream, returning the stream. This routine may convert the image samples into a form that may be encoded as a PWG raster if required, such as by converting to a supported color space.

Parameters
pSessionThe relevant EDL session.
imageThe image to be encoded.
streamThe stream to use to store the image data.
writeSignatureOptional. If true then it writes the PwgRaster document signature to the output stream before the first PWG raster image. The default value is false.

◆ encode() [2/2]

EDL_API void IDOMPWGImage::encode ( const ISessionPtr & pSession,
const IImageFramePtr & frame,
const IOutputStreamPtr & stream,
bool writeSignature = false )
static

Encode the contents of an IImageFrame as a PWG stream, returning the stream. This routine may convert the image samples into a form that may be encoded as TIFF if required, such as by converting to a supported color space.

Parameters
pSessionThe relevant EDL session.
frameThe frame providing the source image data.
streamThe stream to use to store the image data.
writeSignatureOptional. If true then it writes the PwgRaster document signature to the output stream before the first PWG raster image. The default value is false.

◆ getImageIndex()

virtual uint16 IDOMPWGImage::getImageIndex ( ) const
pure virtual

Get the image index of this PWG image to use.

PWG files may contain multiple images; this member returns the index (beginning at 0) of the image that will be used from the TIFF file.

Returns
uint16 The image index.

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