LayerPDFEdit_Layer
ObjectPDEImage

A PDEImage is a PDEElement that contains an image XObject or inline image.

Image XObjects and inline images are described in the following sections in the PDF Reference:

You can associate data or a stream with an image via PDEImageSetData() and PDEImageSetDataStm() methods. PDEImage methods allow your plug-in to get and set properties of images, such as the color space and filters.



Typedef Summary
 Typedef
 PDEImage
A PDEElement that contains an Image XObject or an inline image. You can associate data or a stream with an image.
 PDEImageAttrs
 PDEImageAttrsP
 PDEImageFlate
A reference to a PDEImageFlate.
 PDEImageFlateAttrs
 PDEImageFlateAttrsP
 PDEImageJPX
A reference to a PDEImageJPX.
 PDEImageJPXAttrs
 PDEImageJPXAttrsP
Enumeration Summary
 Enumeration
  PDEImageAttrFlags
Flags for PDEImageAttrs. See Section 4.8.4 in the PDF Reference for more information on image attributes.
  PDEImageColorSpaceFlags
Flags to enable PDEImageGetColorSpaceEx() to return a color space with a particular bpc, depending on the image's bpc.
  PDEImageDataFlags
Flags for PDEImageGetData() , PDEImageGetDataStm() , PDEImageSetData() , and PDEImageSetDataStm() .
Structure Summary
 Structure
 _t_PDEImageAttrs
Attributes of a PDEImage.
 _t_PDEImageJPXAttrs
Attributes of a JPX image.
Method Summary
 Method
 
PDEImageFlate PDEImageAcquireImageFlate(INPDEImage image)
Acquires the PDEImageFlate resource of the PDEImage content element when the image filter type is "FlateDecode", or 0 if it is not.
 
PDEImageJPX PDEImageAcquireImageJPX(INPDEImage image)
Acquires the PDEImageJPX resource of the PDEImage content element when the image filter type is "JPXDecode", or 0 if it is not.
 
PDEImage PDEImageCreate(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASFixedMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns32 encodedLen)
Superseded by PDEImageCreateEx() in Acrobat 10.0.
 
PDEImage PDEImageCreateEx(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASDoubleMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns64 encodedLen)
Supersedes PDEImageCreate() in Acrobat 10.0.
 
PDEImage PDEImageCreateFromCosObj(const CosObj* imageObjP, INASFixedMatrixP matrixP, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP)
Superseded by PDEImageCreateFromCosObjEx() in Acrobat 10.0.
 
PDEImage PDEImageCreateFromCosObjEx(const CosObj* imageObjP, INASDoubleMatrixP matrixP, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP)
Supersedes PDEImageCreateFromCosObj() in Acrobat 10.0.
 
PDEImage PDEImageCreateInCosDoc(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASFixedMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns32 encodedLen, INCosDoc cosDoc)
Superseded by PDEImageCreateInCosDocEx() in Acrobat 10.0.
 
PDEImage PDEImageCreateInCosDoc64(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASFixedMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns64 encodedLen, INCosDoc cosDoc)
Superseded by PDEImageCreateInCosDocEx() in Acrobat 10.0.
 
PDEImage PDEImageCreateInCosDocEx(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASDoubleMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns64 encodedLen, INCosDoc cosDoc)
Supersedes PDEImageCreateInCosDoc() and PDEImageCreateInCosDoc64() in Acrobat 10.0.
 
ASBool PDEImageDataIsEncoded(INPDEImage image, OUTASUns32* encodedLenP)
Determines if image data is encoded or not. It is used only for inline images; it is not relevant to XObject images.
 
Acquires the color space of the flate image. PDERelease should be used to release the color space when it is no longer referenced by the caller.
 
void PDEImageFlateGetAttrs(INPDEImageFlate imgFlate, OUTPDEImageFlateAttrsP attrsP, INASUns32 attrsSize)
Gets the attributes of a flate image.
 
void PDEImageFlateGetCosObj(INPDEImageFlate pdeImageFlate, OUTCosObj* cosObjP)
Gets a Cos object for an image.
 
ASStm PDEImageFlateGetDataStm(INPDEImageFlate imgFlate, INASUns32 flags)
Gets a data stream for a flate compressed image, PDEImageFlate object.
 
void PDEImageGetAttrs(INPDEImage image, INPDEImageAttrsP attrsP, INASUns32 attrsSize)
Gets the attributes for an image.
 
PDEColorSpace PDEImageGetColorSpace(INPDEImage image)
Gets the color space object for an image.
 
PDEColorSpace PDEImageGetColorSpaceEx(INPDEImage image, INASUns32 flags)
Retrieves a PDEImage object's color space, in the desired bits per component, based on the flags parameter.
 
void PDEImageGetCosObj(INPDEImage image, OUTCosObj* cosObjP)
Gets a Cos object for an image.
 
void PDEImageGetData(INPDEImage image, INASUns32 flags, INASUns8* buffer)
Gets an image's data.
 
ASInt32 PDEImageGetDataLen(INPDEImage image)
Gets the length of data for an image.
 
Gets the length of data for an image.
 
ASStm PDEImageGetDataStm(INPDEImage image, INASUns32 flags)
Gets a data stream for an image. It may only be called for XObject images.
 
ASUns32 PDEImageGetDecodeArray(INPDEImage image, OUTASFixed* decode, INASUns32 decodeSize)
Gets the decode array from the attributes of the image. This array specifies the parameters used with the array of filters used to decode the image. This should be called first with a 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.
 
ASInt32 PDEImageGetFilterArray(INPDEImage image, OUTPDEFilterArrayP filtersP)
Gets the filter array for an image.
 
ASUns32 PDEImageGetMatteArray(INPDEImage image, OUTASFixed* matte, INASUns32 numComp)
Gets the matte array for the image XObject.
 
PDEImage PDEImageGetSMask(INPDEImage image)
Gets the soft mask for an image. Use PDERelease() to dispose of the object when it is no longer referenced.
 
ASAtom PDEImageGetType(INPDEImage image)
Returns the type of image as "FlateDecode", "JPXDecode", or "Unknown" when the image filter is not one of these types.
 
ASBool PDEImageHasSMask(INPDEImage image)
Checks whether the image has a soft mask.
 
ASBool PDEImageIsCosObj(INPDEImage image)
Determines if an image is an XObject image.
 
PDEColorSpace PDEImageJPXAcquireColorSpace(INPDEImageJPX pdeImageJPX)
Acquires the PDEColorSpace associated with the JPX encoded image, if one exists. If a PDF color space has not been associated with the JPX encoded image, 0 will be returned. This object is acquired and must be released using PDERelease() when it is no longer in use.
 
JPXColorSpace PDEImageJPXAcquireJPXColorSpace(INPDEImageJPX pdeImageJPX)
Acquires a link list of JPXColorSpace objects defined with the JPX encoded image. if one exists. This object is acquired and must be released using PDERelease() when it is no longer in use.
 
JPXPalette PDEImageJPXAcquirePalette(INPDEImageJPX pdeImageJPX)
Acquires the JPXPalette from the JPX image object This object is acquired and must be released using PDERelease() when it is no longer in use.
 
void PDEImageJPXGetAttrs(INPDEImageJPX pdeImageJPX, OUTPDEImageJPXAttrsP attrsP, INASUns32 attrsSize)
Gets the attributes of a JPX encoded PDEImage.
 
void PDEImageJPXGetCosObj(INPDEImageJPX pdeImageJPX, OUTCosObj* cosObjP)
Gets a Cos object for an image.
 
ASStm PDEImageJPXGetDataStm(INPDEImageJPX pdeImageJPX, INASUns32 flags)
Returns a stream containing the image data. Color component values are interlaced. For images with greater then 8 bits per component, the component values occupy the least significant bits of a two byte value. Valid values of flags are 0.
 
Returns the number of JPX color spaces reference by the JPX encoded image.
 
ASBool PDEImageJPXHasPalette(INPDEImageJPX pdeImageJPX)
Returns true if the JPX encoded image has a JPX palette
 
Sets the color space of the image.
 
void PDEImageSetData(INPDEImage image, INASUns32 flags, INASUns8* buffer, INASUns32 encodedLen)
Sets data for an image.
 
void PDEImageSetDataStm(INPDEImage image, INASUns32 flags, INPDEFilterArrayP filtersP, INASStm stm)
Sets a data stream for an image. It can only be used for XObject images.
 
void PDEImageSetDecodeArray(INPDEImage image, INASFixed* decode, INASUns32 decodeSize)
Sets the decode array of an image.
 
void PDEImageSetMatteArray(INPDEImage image, INASFixed* matte, INASUns32 numComp)
Sets the matte array for the image XObject.
 
void PDEImageSetSMask(INPDEImage image, INPDEImage sMask)
Sets the soft mask.

Typedefs Detail
PDEImage 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct _t_PDEImage* PDEImage;

A PDEElement that contains an Image XObject or an inline image. You can associate data or a stream with an image.

See Also

Examples

go to source arrow volatile PDEImage image = NULL;
go to source arrowPDEImage GetJPXEncodedImage(PDDoc dstDoc, PDDoc srcDoc);
go to source arrowPDEImage GetJPXEncodedImage(PDDoc dstDoc, PDDoc srcDoc)

more...

File: PEExpT.h
Line: 180
PDEImageAttrs 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_PDEImageAttrs PDEImageAttrs;

File: PEExpT.h
Line: 874
PDEImageAttrsP 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_PDEImageAttrs PDEImageAttrsP;

File: PEExpT.h
Line: 874
PDEImageFlate 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct _t_PDEImageFlate* PDEImageFlate;

A reference to a PDEImageFlate.


File: PEExpT.h
Line: 429
PDEImageFlateAttrs 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_PDEImageAttrs PDEImageFlateAttrs;

File: PEExpT.h
Line: 874
PDEImageFlateAttrsP 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_PDEImageAttrs PDEImageFlateAttrsP;

File: PEExpT.h
Line: 874
PDEImageJPX 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct _t_PDEImageJPX* PDEImageJPX;

A reference to a PDEImageJPX.


File: PEExpT.h
Line: 434
PDEImageJPXAttrs 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_PDEImageJPXAttrs PDEImageJPXAttrs;

File: PEExpT.h
Line: 2320
PDEImageJPXAttrsP 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_PDEImageJPXAttrs PDEImageJPXAttrsP;

File: PEExpT.h
Line: 2320

Enumeration Detail
PDEImageAttrFlags
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum PDEImageAttrFlags {
 kPDEImageExternal = 0x0001,
 
 kPDEImageIsMask = 0x0002,
 
 kPDEImageInterpolate = 0x0004,
 
 kPDEImageHaveDecode = 0x0008,
 
 kPDEImageIsIndexed = 0x0010,
 
 kPDEImageMaskedByPosition = 0x0020,
 
 kPDEImageMaskedByColor = 0x0040
}

See Also


File: PEExpT.h
Line: 1767

Elements
kPDEImageExternal  

The image is an XObject.

 
kPDEImageIsMask  

The image is an imagemask.

 
kPDEImageInterpolate  

interpolate is true.

 
kPDEImageHaveDecode  

The image has a decode array.

 
kPDEImageIsIndexed  

The image uses an indexed color space.

 
kPDEImageMaskedByPosition  

The image has a Mask key containing an ImageMask stream.

 
kPDEImageMaskedByColor  

The image has a Mask key containing an array of color values.

PDEImageColorSpaceFlags 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum PDEImageColorSpaceFlags {
 kPDEImageConvert16bpcColorSpace = 0x0001
}

See Also


File: PEExpT.h
Line: 1818

Elements
kPDEImageConvert16bpcColorSpace  

Indicates conversion of the color space of 16 bpc image to 8 bpc.

PDEImageDataFlags 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum PDEImageDataFlags {
 kPDEImageEncodedData = 0x0001,
 
 kPDEImageAllowDelayedRead = 0x0002,
 
 kPDEImage16bpcData = 0x0004
}

See Also


File: PEExpT.h
Line: 1800

Elements
kPDEImageEncodedData  

Indicates that the filter is active; data is encoded.

 
kPDEImage16bpcData  

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.


Structure Detail
_t_PDEImageAttrs
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_PDEImageAttrs {
 ASUns32 flags; 
 
 ASInt32 width; 
 
 ASInt32 height; 
 
 ASInt32 bitsPerComponent; 
 
 ASFixed decode[8]; 
 
 ASAtom intent; 
}

Attributes of a PDEImage.

See Also


File: PEExpT.h
Line: 850

Elements
flags  

PDEImageAttrFlags indicating image attributes.

 
width  

The width of the image corresponding to the Width key in the image dictionary.

 
height  

The height of the image corresponding to the Height key in the image dictionary.

 
bitsPerComponent  

The number of bits used to represent each color component in the image corresponding to the BitsPerComponent key in the image dictionary.

 
decode  

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.

 
intent  

The color rendering intent corresponding to the Intent key in the image dictionary.

_t_PDEImageJPXAttrs 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_PDEImageJPXAttrs {
 ASUns32 flags; 
 
 ASInt32 width; 
 
 ASInt32 height; 
 
 ASInt32 tileWidth; 
 
 ASInt32 tileHeight; 
 
 ASInt32 nResolutions; 
 
 ASInt32 nComponents; 
 
 ASInt32 bpc[24]; 
 
 ASFixed decode[24]; 
}

Attributes of a JPX image.


File: PEExpT.h
Line: 2310


Method Detail
PDEImageAcquireImageFlate()
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImageFlate PDEImageAcquireImageFlate(INPDEImage image)

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.

Parameters

image — 

IN/OUT The PDEImage object.

Returns

a PDEImageFlate resource object.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2930
PDEImageAcquireImageJPX() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImageJPX PDEImageAcquireImageJPX(INPDEImage image)

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.

Parameters

image — 

IN/OUT The PDEImage object.

Returns

a PDEImageJPX resource object.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2944
PDEImageCreate() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreate(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASFixedMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns32 encodedLen)

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.

Parameters

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.

Returns

The image.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 659
PDEImageCreateEx() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreateEx(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASDoubleMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns64 encodedLen)

Supersedes PDEImageCreate() in Acrobat 10.0.

Creates an image object.

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.

Parameters

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.

Returns

The image.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since

Examples

go to source arrow image = PDEImageCreateEx(
go to source arrow desImage = PDEImageCreateEx(&srcImageAttrs, sizeof(srcImageAttrs),

File: PEWProcs.h
Line: 3809
PDEImageCreateFromCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreateFromCosObj(const CosObj* imageObjP, INASFixedMatrixP matrixP, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP)

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.

Parameters

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.

Returns

An image corresponding to the Cos object.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 691
PDEImageCreateFromCosObjEx() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreateFromCosObjEx(const CosObj* imageObjP, INASDoubleMatrixP matrixP, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP)

Supersedes PDEImageCreateFromCosObj() 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.

Parameters

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.

Returns

An image corresponding to the Cos object.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 3886
PDEImageCreateInCosDoc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreateInCosDoc(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASFixedMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns32 encodedLen, INCosDoc cosDoc)

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.

Parameters

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.

Returns

The image.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 3164
PDEImageCreateInCosDoc64() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreateInCosDoc64(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASFixedMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns64 encodedLen, INCosDoc cosDoc)

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.

Parameters

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.

Returns

The image.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 3578
PDEImageCreateInCosDocEx() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageCreateInCosDocEx(INPDEImageAttrsP attrsP, INASUns32 attrsSize, INASDoubleMatrixP matrixP, INASUns32 flags, INPDEColorSpace colorSpace, INPDEColorValueP colorValueP, INPDEFilterArrayP filtersP, INASStm dataStm, INASUns8* data, INASUns64 encodedLen, INCosDoc cosDoc)

Supersedes PDEImageCreateInCosDoc() and PDEImageCreateInCosDoc64() in Acrobat 10.0.

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.

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.

Parameters

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.

Returns

The image.

See Also

Exceptions

peErrUnknownPDEColorSpace
pageErrReadLessImageData
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 3746
PDEImageDataIsEncoded() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDEImageDataIsEncoded(INPDEImage image, OUTASUns32* encodedLenP)

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.

Parameters

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.

Returns

true if PDEImageGetData returns encoded data, false otherwise. It returns false for XObject images.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 895
PDEImageFlateAcquireColorSpace() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEColorSpace PDEImageFlateAcquireColorSpace(INPDEImageFlate imgFlate)

Acquires the color space of the flate image. PDERelease should be used to release the color space when it is no longer referenced by the caller.

Parameters

imgFlate — 

IN/OUT An object of type PDEImageFlate.

Returns

The color space of the flate image; otherwise it returns NULL.

See Also

Since


File: PERProcs.h
Line: 3006
PDEImageFlateGetAttrs() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageFlateGetAttrs(INPDEImageFlate imgFlate, OUTPDEImageFlateAttrsP attrsP, INASUns32 attrsSize)

Gets the attributes of a flate image.

Parameters

imgFlate — 

IN/OUT A flate image resource object.

 
attrsP — 

IN/OUT (Filled by the method) A pointer to a PDEImageFlateAttrs structure containing the attributes of the flate image.

 
attrsSize — 

IN/OUT The size of the attrsP buffer in bytes.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2992
PDEImageFlateGetCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageFlateGetCosObj(INPDEImageFlate pdeImageFlate, OUTCosObj* cosObjP)

Gets a Cos object for an image.

Parameters

pdeImageFlate — 

IN/OUT The flate image whose Cos object is obtained.

 
cosObjP — 

IN/OUT (Filled by the method) The Cos object for the image.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2976
PDEImageFlateGetDataStm() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASStm PDEImageFlateGetDataStm(INPDEImageFlate imgFlate, INASUns32 flags)

Gets a data stream for a flate compressed image, PDEImageFlate object.

The caller must dispose of the returned ASStm by calling ASStmClose().

Parameters

imgFlate — 

IN/OUT The flate 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.

Returns

The stream for the image.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since


File: PERProcs.h
Line: 3028
PDEImageGetAttrs() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageGetAttrs(INPDEImage image, INPDEImageAttrsP attrsP, INASUns32 attrsSize)

Gets the attributes for an image.

Parameters

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.

See Also

Exceptions

peErrUnknownPDEColorSpace

Since

Examples

go to source arrow PDEImageGetAttrs(srcImage, &srcImageAttrs, sizeof(PDEImageAttrs));

File: PERProcs.h
Line: 822
PDEImageGetColorSpace() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEColorSpace PDEImageGetColorSpace(INPDEImage image)

Gets the color space object for an image.

Parameters

image — 

IN/OUT The image whose color space is obtained.

Returns

Color space for image. It returns NULL if image is an image mask.

See Also

Since

Note

(For the Adobe PDF Library v1 only) If you get the PDEColorSpace for an inline image and then get the CosObj for that color space with PDEColorSpaceGetCosObj(), this CosObj is limited. Cos objects that are the result of parsing inline dictionaries in the PDF page contents are a special class of Cos objects. You should never depend on these objects to last for the lifetime of the document. You should extract the information you need from the object immediately, and no longer refer to it in your code.
This method does not change the reference count of the returned PDEColorSpace.

Examples

go to source arrow srcColorSpace = PDEImageGetColorSpace(srcImage);

File: PERProcs.h
Line: 852
PDEImageGetColorSpaceEx() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEColorSpace PDEImageGetColorSpaceEx(INPDEImage image, INASUns32 flags)

Retrieves a PDEImage object's color space, in the desired bits per component, based on the flags parameter.

Parameters

image — 

IN The PDEImage instance whose color space is desired.

 
flags — 

IN A set of flags to specify the desired bits per component (bpc) of the returned color space.

Returns

See Also

Since


File: PERProcs.h
Line: 3314
PDEImageGetCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageGetCosObj(INPDEImage image, OUTCosObj* cosObjP)

Gets a Cos object for an image.

Parameters

image — 

IN/OUT The image whose Cos object is obtained.

 
cosObjP — 

IN/OUT (Filled by the method) The Cos object for the image.

See Also

Exceptions

peErrWrongPDEObjectType

Since

Examples

go to source arrow PDEImageGetCosObj( desImage, &obj);

File: PERProcs.h
Line: 1004
PDEImageGetData() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageGetData(INPDEImage image, INASUns32 flags, INASUns8* buffer)

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().

Parameters

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().

See Also

Exceptions

peErrUnknownPDEColorSpace
genErrBadParm
peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 930
PDEImageGetDataLen() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDEImageGetDataLen(INPDEImage image)

Gets the length of data for an image.

Parameters

image — 

IN/OUT The image whose data length is obtained.

Returns

The number of bytes of image data, specified by the width, height, bits per component, and color space of the image.

See Also

Exceptions

peErrUnknownPDEColorSpace
genErrBadParm
peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 968
PDEImageGetDataLen64() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt64 PDEImageGetDataLen64(INPDEImage image)

Gets the length of data for an image.

Parameters

image — 

IN/OUT The image whose data length is obtained.

Returns

The number of bytes of image data, specified by the width, height, bits per component, and color space of the image. Clients should switch to this routine. PDEImageGetDataLen() will raise an error if it encounters an image with a length that is larger than 2^31 - 1.

See Also

Exceptions

peErrUnknownPDEColorSpace
genErrBadParm
peErrWrongPDEObjectType

Since


File: PEWProcs.h
Line: 3506
PDEImageGetDataStm() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASStm PDEImageGetDataStm(INPDEImage image, INASUns32 flags)

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.

Parameters

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.

Returns

The stream for the image.

See Also

Exceptions

peErrWrongPDEObjectType
genErrBadParm

Since

Examples

go to source arrow srcStm = PDEImageGetDataStm(srcImage, 0);

File: PERProcs.h
Line: 953
PDEImageGetDecodeArray() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 PDEImageGetDecodeArray(INPDEImage image, OUTASFixed* decode, INASUns32 decodeSize)

Gets the decode array from the attributes of the image. This array specifies the parameters used with the array of filters used to decode the image. This should be called first with a 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.

Parameters

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.

Returns

The number of elements in the decode array.

See Also

Since


File: PERProcs.h
Line: 2042
PDEImageGetFilterArray() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDEImageGetFilterArray(INPDEImage image, OUTPDEFilterArrayP filtersP)

Gets the filter array for an image.

Parameters

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.

Returns

The number of filter elements.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 989
PDEImageGetMatteArray() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 PDEImageGetMatteArray(INPDEImage image, OUTASFixed* matte, INASUns32 numComp)

Gets the matte array for the image XObject.

Parameters

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.

Returns

The number of values copied.

Since


File: PERProcs.h
Line: 2433
PDEImageGetSMask() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEImage PDEImageGetSMask(INPDEImage image)

Gets the soft mask for an image. Use PDERelease() to dispose of the object when it is no longer referenced.

Parameters

image — 

An object of type PDEImage.

Returns

An object of type PDEImage.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2418
PDEImageGetType() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASAtom PDEImageGetType(INPDEImage image)

Returns the type of image as "FlateDecode", "JPXDecode", or "Unknown" when the image filter is not one of these types.

Parameters

image — 

IN/OUT The PDEImage object.

Returns

See above.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2917
PDEImageHasSMask() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDEImageHasSMask(INPDEImage image)

Checks whether the image has a soft mask.

Parameters

image — 

IN/OUT An object of type PDEImage.

Returns

true if the soft mask exists, false otherwise.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2407
PDEImageIsCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDEImageIsCosObj(INPDEImage image)

Determines if an image is an XObject image.

Parameters

image — 

IN/OUT The image to examine.

Returns

true if the image is an XObject image, false otherwise.

See Also

Exceptions

peErrWrongPDEObjectType

Since

Examples

go to source arrow && PDEImageIsCosObj((PDEImage)srcElem))

File: PERProcs.h
Line: 865
PDEImageJPXAcquireColorSpace() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDEColorSpace PDEImageJPXAcquireColorSpace(INPDEImageJPX pdeImageJPX)

Acquires the PDEColorSpace associated with the JPX encoded image, if one exists. If a PDF color space has not been associated with the JPX encoded image, 0 will be returned. This object is acquired and must be released using PDERelease() when it is no longer in use.

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

Returns

A PDF colorspace associated with the JPX encoded image.

See Also

PDEImageGetType
PDEImageAcquireJPX

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3065
PDEImageJPXAcquireJPXColorSpace() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

JPXColorSpace PDEImageJPXAcquireJPXColorSpace(INPDEImageJPX pdeImageJPX)

Acquires a link list of JPXColorSpace objects defined with the JPX encoded image. if one exists. This object is acquired and must be released using PDERelease() when it is no longer in use.

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

Returns

A JPX colorspace associated with the JPX encoded image.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3115
PDEImageJPXAcquirePalette() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

JPXPalette PDEImageJPXAcquirePalette(INPDEImageJPX pdeImageJPX)

Acquires the JPXPalette from the JPX image object This object is acquired and must be released using PDERelease() when it is no longer in use.

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

Returns

A JPX palette associated with the JPX encoded image.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3148
PDEImageJPXGetAttrs() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageJPXGetAttrs(INPDEImageJPX pdeImageJPX, OUTPDEImageJPXAttrsP attrsP, INASUns32 attrsSize)

Gets the attributes of a JPX encoded PDEImage.

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

 
attrsP — 

IN/OUT (Filled by the method) A pointer to a PDEImageJPXAttrs structure containing the attributes of the JPX encoded image.

 
attrsSize — 

IN/OUT The size of the attrsP buffer in bytes.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3047
PDEImageJPXGetCosObj() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageJPXGetCosObj(INPDEImageJPX pdeImageJPX, OUTCosObj* cosObjP)

Gets a Cos object for an image.

Parameters

pdeImageJPX — 

IN/OUT The JPX image whose Cos object is obtained.

 
cosObjP — 

IN/OUT (Filled by the method) The Cos object for the image.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 2960
PDEImageJPXGetDataStm() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASStm PDEImageJPXGetDataStm(INPDEImageJPX pdeImageJPX, INASUns32 flags)

Returns a stream containing the image data. Color component values are interlaced. For images with greater then 8 bits per component, the component values occupy the least significant bits of a two byte value. Valid values of flags are 0.

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

 
flags — 

Unused.

Returns

The stream for the image.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3083
PDEImageJPXGetNumColorSpaces() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDEImageJPXGetNumColorSpaces(INPDEImageJPX pdeImageJPX)

Returns the number of JPX color spaces reference by the JPX encoded image.

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

Returns

The number of JPX color spaces specified by the JPX encoded image.

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3096
PDEImageJPXHasPalette() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDEImageJPXHasPalette(INPDEImageJPX pdeImageJPX)

Returns true if the JPX encoded image has a JPX palette

Parameters

pdeImageJPX — 

IN/OUT A JPX encoded image object.

Returns

true if the encoded JPX image contains a palette.

See Also

Exceptions

peErrWrongPDEObjectType

Since


File: PERProcs.h
Line: 3129
PDEImageSetColorSpace() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageSetColorSpace(INPDEImage image, INPDEColorSpace space)

Sets the color space of the image.

Parameters

image — 

IN/OUT The image whose color space is obtained.

 
space — 

IN/OUT An object of type PDEColorSpace.

See Also

PDEImageGetColorSpace
PDEImageSetColorSpace

Exceptions

peErrWrongPDEObjectType

Since


File: PEWProcs.h
Line: 2464
PDEImageSetData() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageSetData(INPDEImage image, INASUns32 flags, INASUns8* buffer, INASUns32 encodedLen)

Sets data for an image.

Parameters

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.

See Also

Exceptions

peErrUnknownPDEColorSpace
genErrBadParm
peErrWrongPDEObjectType

Since


File: PEWProcs.h
Line: 561
PDEImageSetDataStm() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageSetDataStm(INPDEImage image, INASUns32 flags, INPDEFilterArrayP filtersP, INASStm stm)

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().

Parameters

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.

See Also

Exceptions

peErrUnknownPDEColorSpace
peErrWrongPDEObjectType
genErrBadParm

Since


File: PEWProcs.h
Line: 596
PDEImageSetDecodeArray() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageSetDecodeArray(INPDEImage image, INASFixed* decode, INASUns32 decodeSize)

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.

Parameters

image — 

The image whose decode array is set.

 
decode — 

A pointer to the decode array.

 
decodeSize — 

The number of elements in the decode array.

See Also

Since


File: PEWProcs.h
Line: 1748
PDEImageSetMatteArray() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageSetMatteArray(INPDEImage image, INASFixed* matte, INASUns32 numComp)

Sets the matte array for the image XObject.

Parameters

image — 

IN/OUT The image XObject.

 
matte — 

IN/OUT An array of values.

 
numComp — 

IN/OUT The number of values in mArray.

Since


File: PEWProcs.h
Line: 2200
PDEImageSetSMask() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDEImageSetSMask(INPDEImage image, INPDEImage sMask)

Sets the soft mask.

Parameters

image — 

IN/OUT The image XObject.

 
sMask — 

IN/OUT The soft mask.

Exceptions

peErrWrongPDEObjectType

Since


File: PEWProcs.h
Line: 2187