![]() | InDesign SDK 20.5 |
#include <IImageAttributes.h>

Public Types | |
| enum | { kDefaultIID = IID_IIMAGEATTRIBUTES } |
| enum | ImageTagTypes { kPMTagDefault = 0, kPMTagByte = 1, kPMTagWord = 2, kPMTagLong = 3, kPMTagFixed = 4 } |
| enum | { kOPIExtraTIFFASCIITagPrefix = 0x17000000 } |
| enum | { kPMTagImageWidth = 100, kPMTagImageHeight = 101, kPMTagBitsPerChannel = 102, kPMTagColorSpace = 103, kPMTagDocumentName = 104, kPMTagImageDescription = 105, kPMTagChannelsPerPixel = 106, kPMTagNumberOfLayers = 107, kPMTagXResolution = 108, kPMTagYResolution = 109, kPMTagPlanarConfig = 110, kPMTagColorMap = 111, kPMTagOptimalTileWidth = 112, kPMTagOptimalTileHeight = 113, kPMTagChannelNames = 114, kPMTagChannelInfo = 115, kPMTagLayerInfo = 116, kPMTagTIFFClipPath = 117, kPMTagTIFFXClipPathUnits = 118, kPMTagTIFFYClipPathUnits = 119, kPMTagOPIProxy = 120, kPMTagOPIImageID = 121, kPMTagICCProfileData = 122, kPMTagWhiteIsZero = 123, kPMTagAlphaType_obsolete = 124, kPMTagTIFFClipPathName = 125, kPMTagNoOPIGeneration = 126, kPMTagNeverOmit = 127, kPMTagPhotoshop8BIM = 128, kPMTagTransparencyMask = 129, kPMTagAlphaPacking = 130, kPMTagNumberOfVisibleLayers = 131, kPMTagVisibleLayerInfo = 132, kPMTagXMPData = 133, kPMTagChannelTypeArray = 134, kPMTagChannelNameArray = 135, kPMTagEPSProxySource = 136, kPMTagHavePSDComposite = 137, kPMAttributesAreSynthetic = 138, kPMTagHaveICCProfileData = 139, kPMTagImageAttributeRev = 140, kPMTagMetaDataRotation = 141, kPMTagJPEG_EXIF_Resolution = 142, kPMTagPrivate_Thumbnail = 143, kPMTagOrientation = 144, kPMTagUseAIDEforPng = 145 } |
| enum | { kFirstImageAttributeTag = kPMTagImageWidth, kLastImageAttributeTag = kPMTagEPSProxySource } |
| enum | { kEPSPICTProxy = 0, kEPSTIFFProxy = 1, kEPSPSProxy = 2 } |
| enum | { kPMPlanarDefault = kPMChunky } |
Public Member Functions | |
| virtual uint32 | GetTagSize (uint32 tagID) const =0 |
| virtual const char * | GetTag (uint32 tagID, void *imageTagData) const =0 |
| virtual ImageTagTypes | GetTagType (uint32 tagID) const =0 |
| virtual bool16 | SetTag (uint32 tagID, uint32 imageTagSize, const void *imageTagData, ImageTagTypes type=kPMTagDefault)=0 |
| virtual bool16 | DeleteTag (uint32 tagID)=0 |
| virtual bool16 | TagExists (uint32 tagID) const =0 |
| virtual bool16 | CopyTags (const IImageAttributes *copy)=0 |
| virtual uint32 | GetTagCount () const =0 |
| virtual uint32 | GetNthTagSize (uint32 n) const =0 |
| virtual uint32 | GetNthTagID (uint32 n) const =0 |
| virtual ImageTagTypes | GetNthTagType (uint32 n) const =0 |
| virtual const char * | GetNthTag (uint32 n) const =0 |
| virtual const UIDList * | CreateUsedColorUIDList (const UIDList *pUIDList)=0 |
| virtual const UIDList * | GetUsedColorUIDList () const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IImageAttributes are a collection of tags used to describe the attributes of a raster image. The format is very similar to TIFF tags. Each tag ID is associated with a data type, a length and the data itself.
| anonymous enum |
OPI tags identifier. Arithmatically OR kOPIExtraTIFFASCIITagPrefix with a tagID when calling SetTag() to mark it as an ASCII tag which should be downloaded at print time as an OPI2 %TIFFASCIITag: comment. See Open Prepress Interface–Version 2.0 specification to learn more about the %TIFFASCIITag: comment. To retrieve these tags, simply iterate over all of the tags using GetTagCount() and GetNthTagID() and simply test (GetNthTagID(tagIndex) & kOPIExtraTIFFASCIITagPrefix) == kOPIExtraTIFFASCIITagPrefix.
| anonymous enum |
Tag constants. Most are taken straight from TIFF R = required TO ADD YOUR OWN TAGS:
| anonymous enum |
EPS Proxy Source enumeration
| anonymous enum |
Tag default values
ImageTagTypes enumeration. We know the size of the tags enumerated below. However, if a plugin desires to add its own tag, we have to know how to Xfer it and to do so we have to know the type. This realization came after this interface was designed and implemented. Hence, I've added a type argument to SetTag() which defaults to kPMTagDefault. Any plugin which wants to add its own tags simply needs to pass one of the following types to SetTag().
| pure virtual |
Copies all of the tags to this from copy
| pure virtual |
Create or get the UIDList of color swatch UIDs that are used by the image (i.e. PSD or TIFF). If get returns nil, there aren't any
| pure virtual |
Deletes the tag associated with tagID. DeleteTag returns kTrue if it successfully deleted the tag or if the tag didn't exist to begin with.
| pure virtual |
GetNthTag This returns the actual tag data pointer, NOT a copy!
| pure virtual |
GetNthTagID Get the ID associated with the nth tag.
| pure virtual |
GetNthTagSize
| pure virtual |
GetNthTagType Get the data type of the nth tag.
| pure virtual |
Get the tag associated with tagID and copy it into imageTagData Returns a pointer to the actual data if it exists. If the tag doesn't exists or GetTag fails for any reason it will return nil.
| pure virtual |
These last five routines provide a means to iterate over every tag in the attribute list
| pure virtual |
Some clarifications:
ChannelsPerPixel ChannelsPerPixel is equal to the number of extra channels plus either 1 for indexed images or the number of color samples for non-indexed images. For example, an indexed CMYK image with 1 extra channel would return 2 as the number of channels, whereas a normal CMYK image with 1 extra channel would return 5.Get the size in bytes of the tag tagID. If GetSize returns 0 the tag does not exist.
| pure virtual |
Get the datatype of the tag tagID.
| pure virtual |
Add a tag to the image. If a tag with the same ID already exists then the new imageTag will replace it. imageTagSize is the total number of bytes, not the number of elements.
| pure virtual |
If the tag is part of the image attributes then TagExists returns kTrue.