#include <IImageFacade.h>
|
| enum | { kDefaultIID = IID_IIMAGEFACADE } |
| |
|
| 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 IPMStream * | GetImageStream (const UIDRef &imageOrProxyRef) const =0 |
| |
| virtual AGMColorSpace * | GetAGMColorProfileFromImage (const UIDRef &imageOrProxyRef) const =0 |
| |
| virtual ClassID | GetReadFilterClassID (const UIDRef &imageOrProxyRef) const =0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
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
| virtual AGMColorSpace* Facade::IImageFacade::GetAGMColorProfileFromImage | ( | const UIDRef & | imageOrProxyRef | ) | 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
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
- Returns
- AGMColorSpace*
| virtual ErrorCode Facade::IImageFacade::GetChannelInfo | ( | const UIDRef & | imageOrProxyRef, | | | 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
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
| totalChannels | OUT total number of channels |
| colorChannels | OUT total number of color channels (not including spot colors) |
| transparencyAlphas | OUT 0 or 1 |
| spotChannels | OUT total number of spot channels |
| extraChannels | OUT total number of extra alphas which are not spot channels and do not describe transparency |
- Returns
- ErrorCode
| virtual ErrorCode Facade::IImageFacade::GetExtraChannelName | ( | const UIDRef & | imageOrProxyRef, | | | uint32 | extraChannelIndex, | | | PMString & | name | | ) | | const |
| pure virtual |
Get the name of one of the extra channels
- Parameters
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
| extraChannelIndex | IN The zero based index of the extra channel with respect to the first extra channel |
| name | OUT The name of the transparency alpha if it exists. |
- Returns
- ErrorCode
| virtual ErrorCode Facade::IImageFacade::GetImageInfo | ( | const IPMUnknown * | imageOrProxyBoss, | | | PMRect * | bounds, | | | 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
| imageOrProxyBoss | IN a pointer to any of the image's interfaces or its proxy's interfaces. |
| bounds | OUT 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. |
| colorSpace | OUT IF non-nill, then on return it will contain one of kPMGrayColorSpace, kPMRGBColorSpace, kPMCMYKColorSpace or kPMICCLabColorSpace. |
| *xRes | OUT If non-nill, on return will contain the horizontal resolution of the image as a Fixed. To convert to decimal, divide by 65536. |
| *yRes | OUT 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 UIDRef & | imageOrProxyRef, | | | PMRect * | bounds, | | | 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
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
| bounds | OUT 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. |
| colorSpace | OUT IF non-nill, then on return it will contain one of kPMGrayColorSpace, kPMRGBColorSpace, kPMCMYKColorSpace or kPMICCLabColorSpace. |
| *xRes | OUT If non-nill, on return will contain the horizontal resolution of the image as a Fixed. To convert to decimal, divide by 65536. |
| *yRes | OUT 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 UIDRef & | imageOrProxyRef | ) | const |
| pure virtual |
Get a stream to the raw image data of the placed image or its proxy.
- Parameters
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
- Returns
- IPMStream
| virtual const UIDRef Facade::IImageFacade::GetProxyUIDRef | ( | const IPMUnknown * | imageBoss | ) | const |
| pure virtual |
Get the UIDRef of the proxy image
- Parameters
| imageBoss | IN A pointer to one of the interfaces of the image. |
- Returns
- UIDRef of the proxy
| virtual const UIDRef Facade::IImageFacade::GetProxyUIDRef | ( | const UIDRef & | imageRef | ) | const |
| pure virtual |
Get the UIDRef of the proxy image
- Parameters
| imageRef | IN The UIDRef of the image |
- Returns
- UIDRef of the proxy
| virtual ClassID Facade::IImageFacade::GetReadFilterClassID | ( | const UIDRef & | imageOrProxyRef | ) | const |
| pure virtual |
Get the ClassID of the import filter which can read the image.
- Parameters
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
- Returns
- ClassID
| virtual ErrorCode Facade::IImageFacade::GetSpotChannelName | ( | const UIDRef & | imageOrProxyRef, | | | uint32 | spotIndex, | | | PMString & | name | | ) | | const |
| pure virtual |
Get the name of a spot channel
- Parameters
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
| spotIndex | IN The zero based index of the spot channel with respect to the first spot channel |
| name | OUT The name of the spot color |
- Returns
- ErrorCode
| virtual ErrorCode Facade::IImageFacade::GetTransparencyAlphaName | ( | const UIDRef & | imageOrProxyRef, | | | PMString & | name | | ) | | const |
| pure virtual |
Get the name of the Transparency Alpha
- Parameters
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
| name | OUT The name of the transparency alpha if it exists. |
- Returns
- ErrorCode
| virtual bool16 Facade::IImageFacade::IsEmbeddedImage | ( | const IPMUnknown * | boss | ) | const |
| pure virtual |
Is the image embedded. I.e., if kTrue, then the link, if present, is not needed.
- Parameters
| boss | IN A pointer to one of the image's interfaces |
- Returns
- bool16
| virtual bool16 Facade::IImageFacade::IsEmbeddedImage | ( | const UIDRef & | imageRef | ) | const |
| pure virtual |
Is the image embedded. I.e., if kTrue, then the link, if present, is not needed.
- Parameters
| imageRef | IN The UIDRef of the image |
- Returns
- bool16
| virtual bool16 Facade::IImageFacade::IsTransparencyAlphaPreMultiplied | ( | const UIDRef & | imageOrProxyRef | ) | const |
| pure virtual |
Is the transparency alpha pre-multiplied into the color samples. I.e., is the alpha Associated Alpha.
- Parameters
| imageOrProxyRef | IN The UIDRef of the image or its proxy image. |
- Returns
- bool16