DL Logo

PDThumb Typedefs

PDThumb

Header: PDBasicExpT.h:124

Description

A thumbnail preview image of a page.

Syntax

typedef struct _t_PDThumb *PDThumb;

Used By

PDThumbCreationServer

Header: PDExpT.h:3295

Syntax

typedef struct _t_PDThumbCreationServer *PDThumbCreationServer;

Used By

PDThumb Callback Signatures

PDThumbCreationDrawThumbProc

Header: PDExpT.h:3293

Description

(Optional) A callback for PDThumbCreationServer. It is called after PDThumbCreationGetThumbDataProc() and after a PDThumb has been created. It gives the server a chance to draw the thumbnail image in a status window. It may be NULL.

Syntax

void PDThumbCreationDrawThumbProc(PDThumb thumb, void *clientData);

Parameters

thumb
IN/OUT The thumbnail image to draw.
clientData
IN/OUT User-supplied data that was passed in the call to PDDocCreateThumbs().

Used In

PDThumbCreationGetThumbDataProc

Header: PDExpT.h:3278

Description

(Optional) A callback for PDThumbCreationServer. It is called for each page that does not currently contain a thumbnail image. It may be NULL. If it is NULL, the thumbnail data is generated by the default thumbnail generator.

Related Methods

Syntax

ASBool PDThumbCreationGetThumbDataProc(PDPage page, ASFixed thumbScale, ASInt32 width, ASInt32 height, void *thumbData, void *clientData);

Parameters

page
IN/OUT The page for which to create a thumbnail image.
thumbScale
IN/OUT The scale to map from the page size to the thumbnail size, which is either 1/8 of the page size or is limited to MAX_THUMBPAGE_WIDTH and MAX_THUMBPAGE_HEIGHT, whichever is smaller.
width
IN/OUT The width of the thumbnail image to create.
height
IN/OUT The height of the thumbnail image to create.
thumbData
    IN/OUT A buffer into which the thumbnail data is copied. This buffer has the following values:
  • rowBytes = (width * bitsPerPixel + 7) / 8;
  • size = rowBytes * height;

where bitsPerPixel is specified as numComponents * bitsPerComponent. numComponents is dependent upon the color space. For DeviceRGB, numComponents is 3. For an indexed color space, numComponents is 1.

clientData
IN/OUT User-supplied data that was passed in the call to PDDocCreateThumbs().

Returns

true to continue thumbnail image creation, false to halt thumbnail image creation.

Used In

PDThumbCreationNotifyPageProc

Header: PDExpT.h:3245

Description

(Optional) A callback for PDThumbCreationServer. It is called before processing each page. It may be NULL.

Related Methods

Syntax

ASBool PDThumbCreationNotifyPageProc(ASInt32 pageNum, void *clientData);

Parameters

pageNum
IN/OUT The page for which to create a thumbnail image.
clientData
IN/OUT User-supplied data that was passed in the call to PDDocCreateThumbs().

Returns

true to continue thumbnail image creation, false to halt thumbnail image creation.

Used In

PDThumb Structures

_t_PDThumbCreationServer

Header: PDExpT.h:3301

Description

A data structure containing callbacks that implement a creation server. The callbacks implement the creation server functions.

Related Methods

Syntax

struct _t_PDThumbCreationServer {
ASSize_t size;
Set this field to sizeof(PDThumbCreationServerRec).
} PDThumbCreationServerRec;

Used In

PDThumb Functions

PDThumbGetImageData

Header: PDProcs.h:11859

Description

Gets an ASStm from a thumbnail data.

Syntax

ASStm PDThumbGetImageData(PDThumb thumb, ASInt32 *height, ASInt32 *width, ASInt32 *bpc, ASAtom *csName);

Parameters

thumb
The thumb for which image data is to be retrieved.
height
(Filled by the method) The height of the thumbnail.
width
(Filled by the method) The width of the thumbnail.
bpc
(Filled by the method) The number of bits per component in the thumbnail image's data.
csName
(Filled by the method) The color space in which thumnail data is represented.

Returns

An ASStm for the thumbnail data.

PDThumbGetIndexedColorSpace

Header: PDProcs.h:11870

Description

Gets an ASStm from a thumbnail's indexed color space table.

Syntax

ASStm PDThumbGetIndexedColorSpace(PDThumb thumb, ASInt32 *hival, ASAtom *baseColorSpaceName);

Parameters

thumb
The thumb for which image data is to be retrieved.
hival
(Filled by the method) The highest valid index in the lookup table for the Indexed color space.
baseColorSpaceName
(Filled by the method) The base color space in which the values in the color table are to be interpreted.

Returns

An ASStm from the thumbnail's indexed color space table.