Flags for PDEImageAttrs. See the description of image attributes in "Image Dictionaries" in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 8.9.5, page 206.
You can find this document on the web store of the International Standards Organization (ISO).
.
kPDEImageExternal=0x0001 | The image is an XObject.
|
kPDEImageIsMask=0x0002 | The image is an imagemask.
|
kPDEImageInterpolate=0x0004 | interpolate is true. |
kPDEImageHaveDecode=0x0008 | The image has a decode array.
|
kPDEImageIsIndexed=0x0010 | The image uses an indexed color space.
|
kPDEImageMaskedByPosition=0x0020 | The image has a Mask key containing an ImageMask stream.
|
kPDEImageMaskedByColor=0x0040 | The image has a Mask key containing an array of color values.
|
PDEImageGetColorSpaceEx() to return a color space with a particular bpc, depending on the image's bpc. kPDEImageConvert16bpcColorSpace=0x0001 | Indicates conversion of the color space of 16 bpc image to 8 bpc.
|
kPDEImageEncodedData=0x0001 | Indicates that the filter is active; data is encoded.
|
kPDEImageAllowDelayedRead=0x0002 | |
kPDEImage16bpcData=0x0004 | Indicates if the accompanying image data is 16-bit. Should be passed in for 16-bit images to PDEImageGetData/PDEImageGetDataStm to prevent the return of 8-bit converted data.
|
typedef struct _t_PDEImage *PDEImage;
| |
PDEImageAttrFlags indicating image attributes.
| |
The width of the image corresponding to the Width key in the image dictionary.
| |
The height of the image corresponding to the Height key in the image dictionary.
| |
The number of bits used to represent each color component in the image corresponding to the BitsPerComponent key in the image dictionary.
| |
An array of numbers specifying the mapping from sample values in the image to values appropriate for the current color space. These values correspond to the Decode key in the image dictionary.
| |
The color rendering intent corresponding to the Intent key in the image dictionary.
| |
DLADD: 12Feb2024- Added numComponents as part odf PDEImage Attributes. The number of color components in the image's colorspace.
| |
|
| |
|
Acquires the PDEImageFlate resource of the PDEImage content element when the image filter type is "FlateDecode", or 0 if it is not.
Call PDERelease() to dispose of the PDEImageFlate when finished with it.
PDEImageFlate PDEImageAcquireImageFlate(IN PDEImage image);
image | IN/OUT The PDEImage object.
|
Acquires the PDEImageJPX resource of the PDEImage content element when the image filter type is "JPXDecode", or 0 if it is not.
Call PDERelease() to dispose of the PDEImageJPX when finished with it.
PDEImageJPX PDEImageAcquireImageJPX(IN PDEImage image);
image | IN/OUT The PDEImage object.
|
Superseded by PDEImageCreateEx() in Acrobat 10.0. Creates an image object.
The image data may be specified as a stream or as a buffer. If data is non- NULL, dataStm is ignored.
See PDEImageSetDataStm() for information on handling the stream.
The caller must dispose of dataStm after calling this method.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreate(IN PDEImageAttrsP attrsP, IN ASUns32 attrsSize, IN ASFixedMatrixP matrixP, IN ASUns32 flags, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP, IN PDEFilterArrayP filtersP, IN ASStm dataStm, IN ASUns8 *data, IN ASUns32 encodedLen);
attrsP | IN/OUT A pointer to a PDEImageAttrs object with attributes of the image.
|
attrsSize | IN/OUT The size of the
attrsP buffer in bytes. |
matrixP | IN/OUT A pointer to an ASFixedMatrix that holds the transformation matrix to use for the image.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, and the data is provided directly (not as a stream), then
encodedLen must specify the length of data. |
colorSpace | IN/OUT The color space of the image. When the image is an image mask,
colorSpace is the color space of the colorValueP argument. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
filtersP | IN/OUT A pointer to a PDEFilterArray structure that specifies which filters to use in encoding the contents; it may be
NULL. Filters will be used to encode the data in the order in which they are specified in the array. |
dataStm | IN/OUT The stream holding the image data.
|
data | IN/OUT The image data. If
data is non- NULL, dataStm is ignored. If there is a great deal of data, as for a large image, it is recommended you use the dataStm parameter for the image data or use the PDEImageCreateFromCosObj() method. |
encodedLen | IN/OUT The encoded length of
data in bytes. |
Creates an image object. Supersedes PDEImageCreate() in Acrobat 10.0.
The image data may be specified as a stream or as a buffer. If dataStm is non- NULL, data is ignored.
See PDEImageSetDataStm() for information on handling the stream.
The caller must dispose of dataStm after calling this method.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreateEx(IN PDEImageAttrsP attrsP, IN ASUns32 attrsSize, IN ASDoubleMatrixP matrixP, IN ASUns32 flags, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP, IN PDEFilterArrayP filtersP, IN ASStm dataStm, IN ASUns8 *data, IN ASUns64 encodedLen);
attrsP | IN/OUT A pointer to a PDEImageAttrs object with attributes of the image.
|
attrsSize | IN/OUT The size of the
attrsP buffer in bytes. |
matrixP | IN/OUT A pointer to an ASDoubleMatrix that holds the transformation matrix to use for the image.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, and the data is provided directly (not as a stream), then
encodedLen must specify the length of data. |
colorSpace | IN/OUT The color space of the image. When the image is an image mask,
colorSpace is the color space of the colorValueP argument. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
filtersP | IN/OUT A pointer to a PDEFilterArray structure that specifies which filters to use in encoding the contents; it may be
NULL. Filters will be used to encode the data in the order in which they are specified in the array. |
dataStm | IN/OUT The stream holding the image data.
|
data | IN/OUT The image data. If
dataStm is non- NULL, data is ignored. If there is a great deal of data, as for a large image, it is recommended you use the dataStm parameter for the image data or use the PDEImageCreateFromCosObjEx() method. |
encodedLen | IN/OUT The encoded length of
data in bytes. |
Superseded by PDEImageCreateFromCosObjEx() in Acrobat 10.0. Creates an image object from a Cos object.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreateFromCosObj(IN const CosObj *imageObjP, IN ASFixedMatrixP matrixP, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP);
imageObjP | IN/OUT The Cos object for the image.
|
matrixP | IN/OUT A pointer to an ASFixedMatrix that holds the transformation matrix to use for the image.
|
colorSpace | IN/OUT The color space used for the image, if the image is an image mask; otherwise, set it to
NULL. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
Creates an image object from a Cos object. Supersedes PDEImageCreateFromCosObj() in Acrobat 10.0.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreateFromCosObjEx(IN const CosObj *imageObjP, IN ASDoubleMatrixP matrixP, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP);
imageObjP | IN/OUT The Cos object for the image.
|
matrixP | IN/OUT A pointer to an ASDoubleMatrix that holds the transformation matrix to use for the image.
|
colorSpace | IN/OUT The color space used for the image, if the image is an image mask; otherwise, set it to
NULL. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
Superseded by PDEImageCreateInCosDocEx() in Acrobat 10.0. Creates an image object like PDEImageCreate(), except that the client can specify the CosDoc in which the image is created.
The image data may be specified as a stream or as a buffer. If data is non- NULL, dataStm is ignored.
See PDEImageSetDataStm() for information on handling the stream.
The caller must dispose of dataStm after calling this method.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreateInCosDoc(IN PDEImageAttrsP attrsP, IN ASUns32 attrsSize, IN ASFixedMatrixP matrixP, IN ASUns32 flags, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP, IN PDEFilterArrayP filtersP, IN ASStm dataStm, IN ASUns8 *data, IN ASUns32 encodedLen, IN CosDoc cosDoc);
attrsP | IN/OUT A pointer to a PDEImageAttrs object with attributes of the image.
|
attrsSize | IN/OUT The size of the
attrsP buffer in bytes. |
matrixP | IN/OUT A pointer to an ASFixedMatrix that holds the transformation matrix to use for the image.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, and the data is provided directly (not as a stream), then
encodedLen must specify the length of data. |
colorSpace | IN/OUT The color space of the image. When the image is an image mask,
colorSpace is the color space of the colorValueP argument. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
filtersP | IN/OUT A pointer to a PDEFilterArray structure that specifies which filters to use in encoding the contents; it may be
NULL. Filters will be used to encode the data in the order in which they are specified in the array. |
dataStm | IN/OUT The stream holding the image data.
|
data | IN/OUT The image data. If
data is non- NULL, dataStm is ignored. If there is a great deal of data, as for a large image, it is recommended you use the dataStm parameter for the image data or use the PDEImageCreateFromCosObj() method. |
encodedLen | IN/OUT The encoded length of
data in bytes. |
cosDoc | IN/OUT The document in which the image is created.
|
cosDoc | IN/OUT Document in which to put Cos representation of resource. May be NULL.
|
Superseded by PDEImageCreateInCosDocEx() in Acrobat 10.0. Creates an image object like PDEImageCreateInCosDoc(), except that the client can create an image with a large amount of data.
The image data may be specified as a stream or as a buffer. If data is non- NULL, dataStm is ignored.
See PDEImageSetDataStm() for information on handling the stream.
The caller must dispose of dataStm after calling this method.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreateInCosDoc64(IN PDEImageAttrsP attrsP, IN ASUns32 attrsSize, IN ASFixedMatrixP matrixP, IN ASUns32 flags, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP, IN PDEFilterArrayP filtersP, IN ASStm dataStm, IN ASUns8 *data, IN ASUns64 encodedLen, IN CosDoc cosDoc);
attrsP | IN/OUT A pointer to a PDEImageAttrs object with attributes of the image.
|
attrsSize | IN/OUT The size of the
attrsP buffer in bytes. |
matrixP | IN/OUT A pointer to an ASFixedMatrix that holds the transformation matrix to use for the image.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, and the data is provided directly (not as a stream), then
encodedLen must specify the length of data. |
colorSpace | IN/OUT The color space of the image. When the image is an image mask,
colorSpace is the color space of the colorValueP argument. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
filtersP | IN/OUT A pointer to a PDEFilterArray structure that specifies which filters to use in encoding the contents; it may be
NULL. Filters will be used to encode the data in the order in which they are specified in the array. |
dataStm | IN/OUT The stream holding the image data.
|
data | IN/OUT The image data. If
data is non- NULL, dataStm is ignored. If there is a great deal of data, as for a large image, it is recommended you use the dataStm parameter for the image data or use the PDEImageCreateFromCosObj() method. |
encodedLen | IN/OUT The encoded length of
data in bytes. |
cosDoc | IN/OUT The document in which the image is created.
|
cosDoc | IN/OUT The document in which to put the Cos representation of the resource. It may be
NULL. |
Creates an image object like PDEImageCreateInCosDoc(), except that the client can create an image with a large amount of data, and using a double precision transformation matrix. Supersedes PDEImageCreateInCosDoc() and PDEImageCreateInCosDoc64() in Acrobat 10.0.
The image data may be specified as a stream or as a buffer. If dataStm is non- NULL, data is ignored.
See PDEImageSetDataStm() for information on handling the stream.
The caller must dispose of dataStm after calling this method.
Call PDERelease() to dispose of the returned image object when finished with it.
PDEImage PDEImageCreateInCosDocEx(IN PDEImageAttrsP attrsP, IN ASUns32 attrsSize, IN ASDoubleMatrixP matrixP, IN ASUns32 flags, IN PDEColorSpace colorSpace, IN PDEColorValueP colorValueP, IN PDEFilterArrayP filtersP, IN ASStm dataStm, IN ASUns8 *data, IN ASUns64 encodedLen, IN CosDoc cosDoc);
attrsP | IN/OUT A pointer to a PDEImageAttrs object with attributes of the image.
|
attrsSize | IN/OUT The size of the
attrsP buffer in bytes. |
matrixP | IN/OUT A pointer to an ASDoubleMatrix that holds the transformation matrix to use for the image.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, and the data is provided directly (not as a stream), then
encodedLen must specify the length of data. |
colorSpace | IN/OUT The color space of the image. When the image is an image mask,
colorSpace is the color space of the colorValueP argument. |
colorValueP | IN/OUT A pointer to a PDEColorValue structure. If the image is an image mask,
colorValueP must be provided. |
filtersP | IN/OUT A pointer to a PDEFilterArray structure that specifies which filters to use in encoding the contents; it may be
NULL. Filters will be used to encode the data in the order in which they are specified in the array. |
dataStm | IN/OUT The stream holding the image data.
|
data | IN/OUT The image data. If
dataStm is non- NULL, data is ignored. If there is a great deal of data, as for a large image, it is recommended you use the dataStm parameter for the image data or use the PDEImageCreateFromCosObjEx() method. |
encodedLen | IN/OUT The encoded length of
data in bytes. |
cosDoc | IN/OUT The document in which the image is created.
|
cosDoc | IN/OUT The document in which to put the Cos representation of the resource. It may be
NULL. |
Determines if image data is encoded or not. It is used only for inline images; it is not relevant to XObject images.
It always returns false for XObject images; XObject image data can be obtained from PDEImageGetData() or PDEImageGetDataStm(), either encoded or decoded.
If an inline image is obtained via PDEContentCreateFromCosObj() or related methods, the inline image data is always decoded. That is, if PDFEdit parses the stream, the data is always decoded. Only if PDEImageCreate() is used to explicitly create a new image using encoded data does PDEImageDataIsEncoded() return true.
ASBool PDEImageDataIsEncoded(IN PDEImage image, OUT ASUns32 *encodedLenP);
image | IN/OUT The image to examine.
|
encodedLenP | IN/OUT (Filled by the method) The length of the encoded data. If the data is encoded, the method returns
true. |
void PDEImageGetAttrs(IN PDEImage image, IN PDEImageAttrsP attrsP, IN ASUns32 attrsSize);
image | IN/OUT The image whose attributes are obtained.
|
attrsP | IN/OUT (Filled by the method) A pointer to a PDEImageAttrs structure with attributes of image.
|
attrsSize | IN/OUT The size of the
attrsP buffer in bytes. |
Note: This method does not change the reference count of the returned PDEColorSpace.
PDEColorSpace PDEImageGetColorSpace(IN PDEImage image);
image | IN/OUT The image whose color space is obtained.
|
NULL if image is an image mask. PDEImage object's color space, in the desired bits per component, based on the flags parameter. PDEColorSpace PDEImageGetColorSpaceEx(IN PDEImage image, IN ASUns32 flags);
image | |
flags | IN A set of flags to specify the desired bits per component (bpc) of the returned color space.
|
void PDEImageGetCosObj(IN PDEImage image, OUT CosObj *cosObjP);
image | IN/OUT The image whose Cos object is obtained.
|
cosObjP | IN/OUT (Filled by the method) The Cos object for the image.
|
Gets an image's data.
If the image is an XObject image, data is always returned as decoded data.
See the note about inline images under PDEImageDataIsEncoded().
void PDEImageGetData(IN PDEImage image, IN ASUns32 flags, IN ASUns8 *buffer);
image | IN/OUT The image whose data is obtained.
|
flags | IN/OUT Unused- must be zero.
|
buffer | IN/OUT The image data. If the data is decoded,
buffer must be large enough to contain the number of bytes specified in the PDEImageAttrs structure obtained by PDEImageGetAttrs(). If the data is encoded, buffer must be large enough to contain the number of bytes in the encodedLenP parameter obtained by PDEImageDataIsEncoded(). |
ASInt32 PDEImageGetDataLen(IN PDEImage image);
image | IN/OUT The image whose data length is obtained.
|
ASInt64 PDEImageGetDataLen64(IN PDEImage image);
image | IN/OUT The image whose data length is obtained.
|
2^31- 1. Gets a data stream for an image. It may only be called for XObject images.
The caller must dispose of the returned ASStm by calling ASStmClose.
ASStm PDEImageGetDataStm(IN PDEImage image, IN ASUns32 flags);
image | IN/OUT The image whose data stream is obtained.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, data is returned in encoded form. Otherwise, data is decoded.
|
NULL decode to obtain the number of elements that may be returned so that a properly sized array can be allocated for a subsequent call. There are two decode entries per colorant in normal use. ASUns32 PDEImageGetDecodeArray(IN PDEImage image, OUT ASFixed *decode, IN ASUns32 decodeSize);
image | The image whose decode array is obtained.
|
decode | (Filled by the method) A pointer to the
decode array. If it is NULL, the number of decode elements required is returned. |
decodeSize | The number of elements in
decode. |
decode array. ASInt32 PDEImageGetFilterArray(IN PDEImage image, OUT PDEFilterArrayP filtersP);
image | IN/OUT The image whose filter array is obtained.
|
filtersP | IN/OUT (Filled by the method) A pointer to PDEFilterArray structure to fill with the current filter array for the image.
filtersP must be large enough to contain all of the elements. It may be NULL to obtain the number of filter elements. |
ASUns32 PDEImageGetMatteArray(IN PDEImage image, OUT ASFixed *matte, IN ASUns32 numComp);
image | IN/OUT The image XObject.
|
matte | IN/OUT (Filled by the method) An array of values.
|
numComp | IN/OUT The number of values in
matte. |
PDEImage PDEImageGetSMask(IN PDEImage image);
image | An object of type PDEImage.
|
"FlateDecode", "JPXDecode", or "Unknown" when the image filter is not one of these types. ASAtom PDEImageGetType(IN PDEImage image);
image | IN/OUT The PDEImage object.
|
ASBool PDEImageHasSMask(IN PDEImage image);
image | IN/OUT An object of type PDEImage.
|
ASBool PDEImageIsCosObj(IN PDEImage image);
image | IN/OUT The image to examine.
|
void PDEImageSetColorSpace(IN PDEImage image, IN PDEColorSpace space);
image | IN/OUT The image whose color space is obtained.
|
space | IN/OUT An object of type PDEColorSpace.
|
Sets an image's Color Value.
This call is valid only for a PDEImage which is an Image Mask
void PDEImageSetColorValue(IN PDEImage image, IN PDEColorValueP color);
image | IN/OUT The image whose data is set.
|
colorValue | IN/OUT The image data.
|
void PDEImageSetData(IN PDEImage image, IN ASUns32 flags, IN ASUns8 *buffer, IN ASUns32 encodedLen);
image | IN/OUT The image whose data is set.
|
flags | IN/OUT A set of PDEImageDataFlags flags. If kPDEImageEncodedData is set, the data must be encoded for the current filters, and
encodedLen is the length of the encoded data. If the kPDEImageEncodedData flag is not set, data is not encoded and encodedLen is the size of the decoded data. |
buffer | IN/OUT The image data.
|
encodedLen | IN/OUT The length of the encoded data.
|
Sets a data stream for an image. It can only be used for XObject images.
The caller must dispose of the stream by calling ASStmClose().
void PDEImageSetDataStm(IN PDEImage image, IN ASUns32 flags, IN PDEFilterArrayP filtersP, IN ASStm stm);
image | IN/OUT The image whose data stream is set.
|
flags | IN/OUT PDEImageDataFlags flags. If the kPDEImageEncodedData flag is set, the stream must be encoded.
|
filtersP | IN/OUT A pointer to a PDEFilterArray structure. If it is not
NULL, it is used to build Cos objects for the Filter, DecodeParms, and EncodeParms objects. If filtersP is NULL and kPDEImageEncodedData is set in flags, the existing Filter and DecodeParms are used. If kPDEImageEncodedData is not set and filtersP is NULL, the existing Cos objects (if any) for Filter and DecodeParms are removed and the resulting image is no longer compressed. EncodeParms is set it to DecodeParms if it exists (unless the filter is DCTDecode, for which EncodeParms is mandatory). |
stm | IN/OUT The stream for the image data.
|
Sets the decode array of an image.
Normally, the decode array is accessed through the decode field in the PDEImageAttrs structure. However, this method defines a decode array to handle images with a color space that has more than four components.
void PDEImageSetDecodeArray(IN PDEImage image, IN ASFixed *decode, IN ASUns32 decodeSize);
image | The image whose decode array is set.
|
decode | A pointer to the decode array.
|
decodeSize | The number of elements in the decode array.
|
void PDEImageSetMatteArray(IN PDEImage image, IN ASFixed *matte, IN ASUns32 numComp);
image | IN/OUT The image XObject.
|
matte | IN/OUT An array of values.
|
numComp | IN/OUT The number of values in mArray.
|
void PDEImageSetSMask(IN PDEImage image, IN PDEImage sMask);
image | IN/OUT The image XObject.
|
sMask | IN/OUT The soft mask.
|