InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Facade::IImageFacade Class Referenceabstract

#include <IImageFacade.h>

Inheritance diagram for Facade::IImageFacade:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IIMAGEFACADE }
 

Public Member Functions

virtual ErrorCode GetImageInfo (const IPMUnknown *imageOrProxyBoss, PMRect *bounds, int32 *colorSpace, Fixed *xRes, Fixed *yRes) const =0
 
virtual ErrorCode GetImageInfo (const UIDRef &imageOrProxyRef, PMRect *bounds, int32 *colorSpace, Fixed *xRes, Fixed *yRes) const =0
 
virtual ErrorCode GetChannelInfo (const UIDRef &imageOrProxyRef, uint32 &totalChannels, uint32 &colorChannels, uint32 &transparencyAlphas, uint32 &spotChannels, uint32 &otherChannels) const =0
 
virtual ErrorCode GetSpotChannelName (const UIDRef &imageOrProxyRef, uint32 spotIndex, PMString &name) const =0
 
virtual ErrorCode GetTransparencyAlphaName (const UIDRef &imageOrProxyRef, PMString &name) const =0
 
virtual ErrorCode GetExtraChannelName (const UIDRef &imageOrProxyRef, uint32 extraChannelIndex, PMString &name) const =0
 
virtual bool16 IsTransparencyAlphaPreMultiplied (const UIDRef &imageOrProxyRef) const =0
 
virtual const UIDRef GetProxyUIDRef (const IPMUnknown *imageBoss) const =0
 
virtual const UIDRef GetProxyUIDRef (const UIDRef &imageRef) const =0
 
virtual bool16 IsEmbeddedImage (const IPMUnknown *boss) const =0
 
virtual bool16 IsEmbeddedImage (const UIDRef &imageRef) const =0
 
virtual IPMStreamGetImageStream (const UIDRef &imageOrProxyRef) const =0
 
virtual AGMColorSpace * GetAGMColorProfileFromImage (const UIDRef &imageOrProxyRef) const =0
 
virtual ClassID GetReadFilterClassID (const UIDRef &imageOrProxyRef) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

A high level API for dealing with images. Please use the IImageFacade directly via the UtilsBoss if possible, see Utils.h: i.e. Utils<IImageFacade>()->GetImageInfo( ... ) ;

Author
David Stephens
See Also
IImageWrapFacade and IClippingFacade

Member Function Documentation

virtual AGMColorSpace* Facade::IImageFacade::GetAGMColorProfileFromImage (const UIDRefimageOrProxyRef) const
pure virtual

looks in the IImageAttributes of the provided imageRef or proxyRef for the kPMTagICCProfileData tag and converts the data within the tag, if present, to an AGMColorSpace*.

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
Returns
AGMColorSpace*
virtual ErrorCode Facade::IImageFacade::GetChannelInfo (const UIDRefimageOrProxyRef,
uint32 & totalChannels,
uint32 & colorChannels,
uint32 & transparencyAlphas,
uint32 & spotChannels,
uint32 & otherChannels 
) const
pure virtual

Get the number of color channels, alpha channels, and spot colors

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
totalChannelsOUT total number of channels
colorChannelsOUT total number of color channels (not including spot colors)
transparencyAlphasOUT 0 or 1
spotChannelsOUT total number of spot channels
extraChannelsOUT total number of extra alphas which are not spot channels and do not describe transparency
Returns
ErrorCode
virtual ErrorCode Facade::IImageFacade::GetExtraChannelName (const UIDRefimageOrProxyRef,
uint32 extraChannelIndex,
PMStringname 
) const
pure virtual

Get the name of one of the extra channels

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
extraChannelIndexIN The zero based index of the extra channel with respect to the first extra channel
nameOUT The name of the transparency alpha if it exists.
Returns
ErrorCode
virtual ErrorCode Facade::IImageFacade::GetImageInfo (const IPMUnknownimageOrProxyBoss,
PMRectbounds,
int32 * colorSpace,
Fixed * xRes,
Fixed * yRes 
) const
pure virtual

Get the colorspace, bounds in native coordinates, horizontal resolution, and/or the vertical resolution. To convert to InDesign coordinates, you must multiply by 72 and then divide by the image resolution. Client may pass nil for any of the arguments.

Parameters
imageOrProxyBossIN a pointer to any of the image's interfaces or its proxy's interfaces.
boundsOUT If non-nill, then on return it will contain the native bounds of the image. That is, it will contain the width and height in pixels of the native image. To convert to points, multiply by 72 and divide by the resolution.
colorSpaceOUT IF non-nill, then on return it will contain one of kPMGrayColorSpace, kPMRGBColorSpace, kPMCMYKColorSpace or kPMICCLabColorSpace.
*xResOUT If non-nill, on return will contain the horizontal resolution of the image as a Fixed. To convert to decimal, divide by 65536.
*yResOUT If non-nill, on return will contain the vertical resolution of the image as a Fixed. To convert to decimal, divide by 65536.
Returns
ErrorCode
virtual ErrorCode Facade::IImageFacade::GetImageInfo (const UIDRefimageOrProxyRef,
PMRectbounds,
int32 * colorSpace,
Fixed * xRes,
Fixed * yRes 
) const
pure virtual

Get the colorspace, bounds in native coordinates, horizontal resolution, and/or the vertical resolution. To convert to InDesign coordinates, you must multiply by 72 and then divide by the image resolution. Client may pass nil for any of the arguments.

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
boundsOUT If non-nill, then on return it will contain the native bounds of the image. That is, it will contain the width and height in pixels of the native image. To convert to points, multiply by 72 and divide by the resolution.
colorSpaceOUT IF non-nill, then on return it will contain one of kPMGrayColorSpace, kPMRGBColorSpace, kPMCMYKColorSpace or kPMICCLabColorSpace.
*xResOUT If non-nill, on return will contain the horizontal resolution of the image as a Fixed. To convert to decimal, divide by 65536.
*yResOUT If non-nill, on return will contain the vertical resolution of the image as a Fixed. To convert to decimal, divide by 65536.
Returns
ErrorCode
virtual IPMStream* Facade::IImageFacade::GetImageStream (const UIDRefimageOrProxyRef) const
pure virtual

Get a stream to the raw image data of the placed image or its proxy.

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
Returns
IPMStream
virtual const UIDRef Facade::IImageFacade::GetProxyUIDRef (const IPMUnknownimageBoss) const
pure virtual

Get the UIDRef of the proxy image

Parameters
imageBossIN A pointer to one of the interfaces of the image.
Returns
UIDRef of the proxy
virtual const UIDRef Facade::IImageFacade::GetProxyUIDRef (const UIDRefimageRef) const
pure virtual

Get the UIDRef of the proxy image

Parameters
imageRefIN The UIDRef of the image
Returns
UIDRef of the proxy
virtual ClassID Facade::IImageFacade::GetReadFilterClassID (const UIDRefimageOrProxyRef) const
pure virtual

Get the ClassID of the import filter which can read the image.

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
Returns
ClassID
virtual ErrorCode Facade::IImageFacade::GetSpotChannelName (const UIDRefimageOrProxyRef,
uint32 spotIndex,
PMStringname 
) const
pure virtual

Get the name of a spot channel

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
spotIndexIN The zero based index of the spot channel with respect to the first spot channel
nameOUT The name of the spot color
Returns
ErrorCode
virtual ErrorCode Facade::IImageFacade::GetTransparencyAlphaName (const UIDRefimageOrProxyRef,
PMStringname 
) const
pure virtual

Get the name of the Transparency Alpha

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
nameOUT The name of the transparency alpha if it exists.
Returns
ErrorCode
virtual bool16 Facade::IImageFacade::IsEmbeddedImage (const IPMUnknownboss) const
pure virtual

Is the image embedded. I.e., if kTrue, then the link, if present, is not needed.

Parameters
bossIN A pointer to one of the image's interfaces
Returns
bool16
virtual bool16 Facade::IImageFacade::IsEmbeddedImage (const UIDRefimageRef) const
pure virtual

Is the image embedded. I.e., if kTrue, then the link, if present, is not needed.

Parameters
imageRefIN The UIDRef of the image
Returns
bool16
virtual bool16 Facade::IImageFacade::IsTransparencyAlphaPreMultiplied (const UIDRefimageOrProxyRef) const
pure virtual

Is the transparency alpha pre-multiplied into the color samples. I.e., is the alpha Associated Alpha.

Parameters
imageOrProxyRefIN The UIDRef of the image or its proxy image.
Returns
bool16