Mako 7.5.0 API
Loading...
Searching...
No Matches
IDOMTrivialImage Class Reference

Interface for a "trivial" image. More...

#include <idomimageresource.h>

Inheritance diagram for IDOMTrivialImage:

Classes

class  Data
 Initialization data. More...
 

Public Member Functions

virtual IInputStreamPtr getStream () const
 This image type does not allow direct access to the underlying streams.
 
virtual void setStream (const IInputStreamPtr &stream)
 This image type does not allow direct access to the underlying streams.
 
- 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 uint64 getStreamLength () const =0
 Retrieves the stream length, if it is available.
 
virtual const EDLSysString & getUri () 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 EDL_API IDOMTrivialImagePtr create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &colorSpace, uint16 width, uint16 height, uint32 stride, uint8 bitsPerComponent, const CEDLSimpleBuffer &imageData, eImageExtraChannelType extraChannel=eIECNone, eDOMImageType type=eDITUnknown)
 Create a "trivial" image resource with the given memory and pixel data.
 
static const CClassIDclassID ()
 Retrieves class id of IDOMRawImage.
 

Additional Inherited Members

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

Detailed Description

Interface for a "trivial" image.

A trivial image is used for cases where the image data is extremely small, to the point that it is wasteful to store in a separate stream.

The resolution is fixed to 96 dpi. Otherwise, supported color spaces, channel formats, and available depths are as per IDOMRawImage.

Member Function Documentation

◆ classID()

static const CClassID & IDOMTrivialImage::classID ( )
inlinestatic

Retrieves class id of IDOMRawImage.

Returns
CClassID Class id of the element

◆ create()

static EDL_API IDOMTrivialImagePtr IDOMTrivialImage::create ( IEDLClassFactory * pFactory,
const IDOMColorSpacePtr & colorSpace,
uint16 width,
uint16 height,
uint32 stride,
uint8 bitsPerComponent,
const CEDLSimpleBuffer & imageData,
eImageExtraChannelType extraChannel = eIECNone,
eDOMImageType type = eDITUnknown )
static

Create a "trivial" image resource with the given memory and pixel data.

Parameters
pFactoryThe EDL Class factory to use.
colorSpaceThe color space to use. Any valid color space may be used for IDOMTrivialImage.
widthThe width of the image, in pixels.
heightThe height of the image, in pixels.
strideThe distance in memory, in bytes, from one scanline to the next.
bitsPerComponentThe bits per component to use. 1, 2, 4, 8, 12 and 16 bits per sample are supported.
imageDataA buffer containing the image data. Must be height * stride bytes and presented in Mako/PDF standard image byte order (big endian if 12 or 16 bit).
extraChannelThe type of extra channel, if provided.
typeThe image type.
Returns
IDOMRawImagePtr The new image.

◆ getStream()

virtual IInputStreamPtr IDOMTrivialImage::getStream ( ) const
inlinevirtual

This image type does not allow direct access to the underlying streams.

Returns
IInputStreamPtr Always nullptr

Implements IDOMResource.

◆ setStream()

virtual void IDOMTrivialImage::setStream ( const IInputStreamPtr & stream)
inlinevirtual

This image type does not allow direct access to the underlying streams.

Parameters
streamA smart pointer to the stream

Implements IDOMResource.


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