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

#include <ICreateLowResImageCmdData.h>

Inheritance diagram for ICreateLowResImageCmdData:
IPMUnknown

Classes

struct  lowResDataStruct
 

Public Member Functions

virtual void Init (const lowResDataStruct *data)=0
 
virtual const lowResDataStructGetLowResInfo () const =0
 
virtual void Init (const AGMImageAccessor *imageAccessor, uint32 resolution)=0
 
virtual bool8 GetImageAccessor (const AGMImageAccessor **imageAccessor, uint32 *resolution) 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

ICreateLowResImageCmdData is used to pass command data to the kCreateLowResImageCmdBoss. When placing images (raster or vector based), InDesign creates a low resolution (typically 72ppi) version of the image and stores it in the document such that if the linked image is missing or out of date, we can still draw it and we can draw it much faster than drawing at full resolution. The proxy image that is generated is typically a kImageInDB boss object and its UID is stored in the IID_IIMAGEDATAACCESS interface off of the main page item's boss (e.g. kImageItem).

The proxy image's boss (i.e. kImageInDB), has many of the same interfaces as the main page item for raster based images (i.e. kImageItem). For example, both bosses have an IID_IIMAGEATTRIBUTES where the IID_IIMAGEATTRIBUTES on the main page item stores the attributes of the linked image as reported by the filter that parsed the image and the IID_IIMAGEATTRIBUTES on the proxy's boss stores the attributes of the proxy image. The main page item boss for vector based images such as PDF and EPS have a different set of interfaces that are more pertinent to vector graphics.

The kCreateLowResImageCmdBoss command is typically called when placing/importing images from the command that is responsible for filling out the interfaces on the main page item's boss.

Member Function Documentation

virtual bool8 ICreateLowResImageCmdData::GetImageAccessor (const AGMImageAccessor ** imageAccessor,
uint32 * resolution 
) const
pure virtual

Get the imageAccessor that was set in Init( const AGMImageAccessor *, uint32 *) if the proxy is being generated from an in-memory bitmap.

Parameters
imageAccessor[OUT]: Optional. On return, will contain a pointer to the AGMImageAccessor
resolution[OUT]: Optional. On return, will contain the resolution of the bitmap.
Returns
True if a valid AGMImageAccessor was passed to Init(const AGMImageAccessor *, uint32 *).
virtual const lowResDataStruct* ICreateLowResImageCmdData::GetLowResInfo () const
pure virtual

Get the data that was set in Init( const lowResDataStruct*) if the proxy is being generated from a stream to an image.

Returns
A pointer to the data. This pointer is valid for the lifespan of the interface.
virtual void ICreateLowResImageCmdData::Init (const lowResDataStructdata)
pure virtual

If the proxy will be generated from a stream to an existing image, use the following Init().

Parameters
data[IN]: Contains information about the source image and how to construct the proxy image.
virtual void ICreateLowResImageCmdData::Init (const AGMImageAccessorimageAccessor,
uint32 resolution 
)
pure virtual

If the proxy will be generated from an in-memory bitmap, use the following Init(). Once this Init() is called, the bitmap contained in the AGMImageAccessor will be owned by this interface and should not be deleted.

Parameters
imageAccessor[IN]: A pointer to the source bitmap from which to generate a proxy.
resolution[IN]: The resolution of the bitmap.