DL Logo

PDEImage Enumerations

DLImageCompression

Header: DLExtrasExpT.h:455

Description

Compression values for exporting TIF images.

Enum Constants

Compression_Default
Use the default for the output image type.
Compression_NONE
Use no image compression. Valid for BMP, PNG and TIFF outputs only.
Compression_FLATE
Deflate algorithm (PNG only). An open source standard widely used for creating zip files and with PDF.
Compression_LZW
Lempel-Ziv-Welch, valid for TIFF output. A lossless algorithm, resulting files are larger but retain original quality.
Compression_G3
CCITT Group3 compression. Valid for TIFF, requires colorModel gray. A lossless algorithm for black and white images that efficiently compresses whitespace.
Compression_G4
CCITT Group4 compression. Valid for TIFF, requires colorModel gray. A lossless algorithm for black and white images based on G3.
Compression_DCT
Discrete Cosine Transform. Lossy algorithm, valid for JPEG. Best when used with continuous tone (such as photographs).

Returned From

Used In

DLTIFFByteOrder

Header: DLExtrasExpT.h:472

Enum Constants

Order_BigEndian=0
Order_LittleEndian=1
HostEndian=2

Used In

PDEImage Structures

DLPDEImageExportParams

Header: DLExtrasExpT.h:475

Description

Structure containing additional image export parameters that can be set by the user.

Syntax

struct DLPDEImageExportParams {
ASBool ReverseGray;
Default: false. When set to true reverse GrayScale image. This is only valid for images using the DeviceGray ColorSpace.
ASBool TIFFBlackIsOne;
Default: false. When set to true Photometrically reverse a TIF image. This is only valid for an output image of type TIF.
ASBool HalftoneGrayImages;
Default: false. Convert 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi.
ASInt32 JPEGQuality;
Default: 75. Quality of the image(0-100). Note this is only valid for JPEG Images.
ASDouble ExportHorizontalDPI;
Default: 72. This value sets the image's Horizontal DPI (Dots Per Inch), which will be used during the exporting process.
ASDouble ExportVerticalDPI;
Default: 72. This value sets the image's Vertical DPI (Dots Per Inch), which will be used during the exporting process.
DLImageCompression TIFFCompression;
Default: Default. Type of compression to be used in saving the image to a file. Note this is only valid for TIF Images.
ASUns8 MonochromeThreshold;
Default: 128. Threshold to use for determining which bits are white or black for Monochrome output(0-255). This is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false.
ASBool TIFFCMYKAlpha;
Default: false. When set to true, if the image data is in CMYK and there is a Soft Mask image present, they will be combined as CMYK + Alpha Channel TIFF output (40-bit). This is only valid for an output image of type TIF.
ASBool RaiseExceptionIfNotUsableColor;
Default: false. When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, we will automatically convert the image into a form that can be saved natively (Generally, that for will be DeviceRGB, using the sRGB profile.
ASBool WriteSeparationColorsToTIFF;
Default: false. When true, we will output the separation color space to a TIFF image, using the TIFF Photoshop tag. When false, Separation colors will be converted their alternate color space, and rendered as RGB.
ASBool DisableAlphaChannelGeneration;
Default: false. When set to false, if the image data is in RGB and there is a Mask present, they will be combined as RGBA + Alpha Channel output (32-bit). When set to true, if the image date is in RGB and there is a Mask present, they will not be combined and the output will be RGB (24-bit). This is only valid for an output image of type TIF and PNG.
DLTIFFByteOrder TIFFByteOrder;
Default: BigEndian. The byte order used within the TIFF file.
} DLPDEImageExportParams;

Returned From

Used By

PDEImage Functions

DLColorConvertPDEImage

Header: DLExtrasProcs.h:1225

Description

Converts the colorspace of a provided image using a new color profile and render intent.

Syntax

PDEImage DLColorConvertPDEImage(PDDoc *document, PDEImage image, AC_ProfileCode code, AC_RenderIntent intent, ASBool embed);

Parameters

document
A pointer to a PDDoc object containing the PDEImage.
image
The PDEImage in a PDF document that will be converted.
code
The code of the target profile for the conversion.
intent
The rendering intent of used to convert the image.
embed
A boolian value. If true, embed the target profile. If false the resulting color is Device, if possible.

Returns

A newly converted PDEImage image.

DLCreatePDEImageFromFile

Header: DLExtrasProcs.h:1129

Description

Imports an image file (TIFF, JPEG, BMP, PNG, GIF) from the specified file path to a PDEImage.

Syntax

PDEImage DLCreatePDEImageFromFile(ASPathName imageInputPath, ASFileSys fileSys);

Parameters

imageInputPath
The input path of the image.
fileSys
The File System in use.

Returns

A PDEImage object created from the input image.

DLCreateResampledPDEImage

Header: DLExtrasProcs.h:1263

Description

Create a new PDEImage from an existing one modifying the resolution (dots per inch). This image can be freely modified inside a PDF document.

Syntax

PDEImage DLCreateResampledPDEImage(PDEImage image, DLPDEImageExportParams *exportParams, ASInt32 resolution);

Parameters

image
The PDEImage in a PDF document.
exportParams
A pointer to the DLPDEImageExportParams structure used by the PDEImage. During the function call, ExportHorizontalDPI and ExportVeritcalDPI are updated to using the new resolution.
resolution
The new resolution as a 32 bit integer value.

Returns

A new PDEImage recreated using the new resolution. This newly created image can be freely manipulated inside a PDF document.

DLExportPDEImage

Header: DLExtrasProcs.h:1139

Description

Exports a PDEImage from a document to a specified image type TIFF, JPEG, BMP, PNG, GIF the specified file path.

Syntax

void DLExportPDEImage(PDEImage image, ASPathName outputPath, DLImageExportType exporttype, DLPDEImageExportParams exportParams);

Parameters

image
The PDEImage in a PDF document.
outputPath
The output path of the image.
exporttype
The exported image format (TIFF, JPEG, BMP, PNG, GIF).
exportParams
The DLPDEImageExportParams structure.

DLPDEImageGetCompression

Header: DLExtrasProcs.h:1251

Description

Gets the compression scheme of the image data.

Syntax

DLImageCompression DLPDEImageGetCompression(const PDEImage image);

Parameters

image
The PDEImage in a PDF document.

Returns

A DLImageCompression value representing the image data's compression filter.

DLPDEImageGetExportParams

Header: DLExtrasProcs.h:1195

Description

Initializes a structure of PDEImage export parameters with default values.

Syntax

DLPDEImageExportParams DLPDEImageGetExportParams();

Returns

The DLImageExportParams structure.

DLPDEImageGetHeight

Header: DLExtrasProcs.h:1188

Description

Gets height of specified image.

Syntax

ASDouble DLPDEImageGetHeight(const PDEImage image);

Parameters

image
The PDEImage in a PDF document.

Returns

The height of image as an ASDouble.

DLPDEImageGetIntent

Header: DLExtrasProcs.h:1234

Description

Gets the image's Render Intent.

Syntax

const char *DLPDEImageGetIntent(const PDEImage inputImage);

Parameters

image
The PDEImage in a PDF document.

Returns

A pointer to the string representation of the ASAtom name of the image's intent data.

DLPDEImageGetSoftMask

Header: DLExtrasProcs.h:1204

Description

Gets the soft masl of a provided image.

Syntax

PDEImage *DLPDEImageGetSoftMask(const PDEImage image);

Parameters

image
The PDEImage in a PDF document.

Returns

The pointer to the PDEImage's soft mask, or a null pointer of no mask exists.

DLPDEImageGetWidth

Header: DLExtrasProcs.h:1179

Description

Gets width of specified image.

Syntax

ASDouble DLPDEImageGetWidth(const PDEImage image);

Parameters

image
The PDEImage in a PDF document.

Returns

The width of image as an ASDouble.

DLPDEImageRotate

Header: DLExtrasProcs.h:1170

Description

Rotates an image by theta degrees. A rotation is produced by [cos(theta), sin(theta),-sin(theta), cos(theta), 0, 0], which has the effect of rotating the coordinate system axes by an angle theta (degrees) counterclockwise.

Syntax

void DLPDEImageRotate(PDEImage image, ASDouble theta);

Parameters

image
The PDEImage in a PDF document.
theta
The rotation angle (degrees).

DLPDEImageScale

Header: DLExtrasProcs.h:1161

Description

Scales an image by sx units. A scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimension of the new coordinate system is the same size as sx and sy units, respectively, as in the previous coordinate system.

Syntax

void DLPDEImageScale(PDEImage image, ASDouble sx, ASDouble sy);

Parameters

image
The PDEImage in a PDF document.
sx
X scaling factor.
sy
Y scaling factor.

DLPDEImageSetIntent

Header: DLExtrasProcs.h:1242

Description

Sets the image's Render Intent.

Syntax

void DLPDEImageSetIntent(PDEImage inputImage, const char *renderIntent);

Parameters

image
The PDEImage in a PDF document.
renderIntent
A pointer to the string representation of an ASAtom value that will be used to set the image's intent data.

DLPDEImageSetSoftMask

Header: DLExtrasProcs.h:1212

Description

Uses the specified soft mask and applies it to the PDEImage.

Syntax

void DLPDEImageSetSoftMask(PDEImage image, PDEImage *softMask);

Parameters

image
The PDEImage in a PDF document.
softMask
The pointer to the PDEImage's soft mask, that will be applied to the PDEImage, or a null pointer which will delete the current soft mask.

DLPDEImageTranslate

Header: DLExtrasProcs.h:1151

Description

Translates an image by (tx,ty) units. A translation is specified as [ 1 0 0 1 tx ty], where tx and ty are the distance to translate from the origin of the coordinate system in the horizontal and vertical dimension, respectively.

Syntax

void DLPDEImageTranslate(PDEImage image, ASDouble tx, ASDouble ty);

Parameters

image
The PDEImage in a PDF document.
tx
X translation distance.
ty
Y translation distance.

PDEImageGetColorValue

Header: PERProcs.h:3393

Description

Gets an image's Color Value.

This call is valid only for a PDEImage which is an Image Mask

Syntax

void PDEImageGetColorValue(IN PDEImage image, IN PDEColorValueP color);

Parameters

image
IN/OUT The image whose data is obtained.
colorValue
IN/OUT The image data.

Exceptions

PDEImageJPXGetSMask

Header: DLExtrasProcs.h:1524

Description

Retrieves the SoftMask image contained within the JPX-encoded data.

Syntax

PDEImage PDEImageJPXGetSMask(PDEImageJPX pdeImageJPX);

Parameters

pdeImageJPX
IN The JP2K encoded image object. NOTE: The returned PDEImage must be released using PDERelease() when done using it.

Returns

The PDEImage representing the Soft Mask image of the JPX-encoded data if one is present, otherwise NULL.

PDEImageRemoveIndexedColor

Header: DLExtrasProcs.h:794

Description

If the image input uses an indexed color space, a new image will be created from it. The new image will use the base color space. If the image is not using an indexed color model, the original image will be incremented and returned.

Note: The image returned must be released when no longer needed.

Syntax

PDEImage PDEImageRemoveIndexedColor(PDEImage image);

Parameters

image
The Indexed image inP.

Returns

The new image or the original image.