AcquireRecord Struct Reference

This structure is passed to the plug-in module through the parameter block. More...

#include <PIAcquire.h>

Data Fields

int32 serialNumber
TestAbortProc abortProc
 A pointer to the TestAbortProc callback.
ProgressProc progressProc
 A pointer the the ProgressProc callback.
int32 maxData
 The maximum number of bytes Photoshop can free up for a plug-in to use.
int16 imageMode
 The mode of the image being imported (grayscale, RGB Color, and so on).
Point imageSize
int16 depth
 The resolution of the image in bits per pixel per plane.
int16 planes
 The number of channels in the image.
Fixed imageHRes
 The horizontal resolution of the image in terms of pixels per inch.
Fixed imageVRes
 The vertical resolution of the image in terms of pixels per inch.
LookUpTable redLUT
 The red color table of the image.
LookUpTable greenLUT
 The green color table of the image.
LookUpTable blueLUT
 The blue color table of the image.
void * data
 The buffer where image data is stored.
Rect theRect
int16 loPlane
 The first plane being returned.
int16 hiPlane
 The last plane being returned.
int16 colBytes
 The offset in bytes between columns of data in the buffer.
int32 rowBytes
 The offset in bytes between rows of data in the buffer.
int32 planeBytes
 The offset in bytes between planes of data in the buffers.
Str255 filename
 Document file name.
int16 vRefNum
Boolean dirty
 Indicates whether the user is prompted to save the image when closing the window.
OSType hostSig
 The signature of the host, provided by the host.
HostProc hostProc
 A pointer to a host-defined callback procedure.
int32 hostModes
 The image modes supported by the host.
PlaneMap planeMap
 Maps plug-in plane (channel) numbers to host plane numbers.
Boolean canTranspose
 Indicates whether the host supports transposing images during or after scanning.
Boolean needTranspose
 Indicates whether the plug-in needs the image transposed.
Handle duotoneInfo
 A handle for duotone information.
int32 diskSpace
SpaceProc spaceProc
 A pointer to the SpaceProc callback.
PlugInMonitor monitor
 Monitor setup information for the host.
void * platformData
 Platform specific information.
BufferProcsbufferProcs
 A pointer to the Buffer suite if it is supported by the host, otherwise NULL.
ResourceProcsresourceProcs
 A pointer to the Pseudo-Resource suite if it is supported by the host, otherwise NULL.
ProcessEventProc processEvent
 A pointer to the ProcessEventProc callback if it is supported by the host, otherwise NULL.
Boolean canReadBack
 Indicates whether host supports reading back image data for further processing, set to TRUE if it does.
Boolean wantReadBack
 Indicates whether the plug-in wants to read the data back.
Boolean acquireAgain
 Indicates that the plug-in wants to acquire another image once it has completed importing an image.
Boolean canFinalize
 Indicates whether the host can invoke the finalize selector; TRUE if it can.
DisplayPixelsProc displayPixels
 A pointer to the DisplayPixelsProc callback if it is supported by the host, otherwise NULL.
HandleProcshandleProcs
 A pointer to the Handle callback suite if it is supported by the host, otherwise NULL.
Boolean wantFinalize
 Indicates that the plug-in wants an acquireSelectorFinalize call if the host provides the newer protocol.
char reserved1 [3]
 Provides alignment to a four byte boundary.
ColorServicesProc colorServices
 A pointer to the ColorServices callback if it is supported by the host, otherwise NULL.
AdvanceStateProc advanceState
 AdvanceState callback.
ImageServicesProcsimageServicesProcs
 Image Services callback suite.
int16 tileWidth
 The width of the tiles provided by the host.
int16 tileHeight
 The height of the tiles provided by the host.
Point tileOrigin
 The origin point of the tiling system.
PropertyProcspropertyProcs
 Property callback suite.
PIDescriptorParametersdescriptorParameters
 Descriptor callback suite.
Str255 * errorString
 An error reporting string to return to Photoshop.
Boolean isFirstAlphaTransparency
 Indicates whether the first alpha channel contains transparency; TRUE if it does.
char padding0
 Fill character.
char padding1
 Fill character.
char padding2
 Fill character.
int32 maxValue
 Maximum value of data; only used for 16 bit data.
SPBasicSuite * sSPBasic
 PICA basic suite.
void * plugInRef
 Plug-in reference used by PICA.
int32 transparentIndex
 If IndexedColor, and < 256, this is the index of the transparent color (for GIF).
Handle iCCprofileData
 Handle containing the ICC profile for the image; NULL if none.
int32 iCCprofileSize
 Size of iCCprofileData.
int32 canUseICCProfiles
 Indicates if the host uses ICC Profiles.
char * pushDataSource
 Pointer to c-string that contains TWAIN data source name.
int32 lutCount
 Number of entries in the indexed color table.
int32 convertMode
 Indicates whether the host supports conversion after reading; 0 if it does not, -1 if it does.
int32 HostSupports32BitCoordinates
 Indicates whether the host supports 32 bit plug-in API.
int32 PluginUsing32BitCoordinates
 Indicates whether the plug-in is using the 32-bit fields; set to nonzero by the plug-in if it is.
VPoint imageSize32
 Size of image in 32 bit coordinates.
VRect theRect32
 Rectangle being returned in 32 bit coordinates.
int64 diskSpace64
 Free disk space on the host's scratch disk or disks.
uint16 * unicodeFilename
 Null terminated UTF16 filename set by the plug-in.
ChannelPortProcschannelPortProcs
 Suite for passing pixels through channel ports, used for the Stack Renderer plug-in.
ReadImageDocumentDescdocumentInfo
 Source document pixel data; used for the Stack Renderer plug-in.
Reserved Space for Expansion
char reserved [100]
 Reserved for future use.

Detailed Description

This structure is passed to the plug-in module through the parameter block.

See Plug-in Entry Point for an explanation of how the host calls a plug-in.


Field Documentation

Deprecated:
Formerly the host serial number.

The host now reports zero for the serialNumber. Plug-ins should use the Property Suite Callbacks through the AcquireRecord::propertyProcs field and specify propSerialString2 to get the serial string.

A pointer to the TestAbortProc callback.

A pointer the the ProgressProc callback.

The maximum number of bytes Photoshop can free up for a plug-in to use.

The plug-in can reduce this value during in the handler for acquireSelectorPrepare. The acquireSelectorContinue handlers should process the image in pieces no larger than maxData, less the size of any large tables or scratch areas it has allocated.

The mode of the image being imported (grayscale, RGB Color, and so on).

The plug-in should set this field during the acquireSelectorStart handler. See Image Modes for possible values.

Deprecated:
Use AcquireRecord::imageSize32.

The size of the image. The plug-in should should set this field in the acquireSelectorStart handler to inform Photoshop of the width, imageSize.h and height, imageSize.v of the image in pixels. For large document support, see AcquireRecord::imageSize32

The resolution of the image in bits per pixel per plane.

The plug-in should set this field in the acquireSelectorStart handler. The valid settings are 1, 8, 16, or 32.

The number of channels in the image.

The plug-in should set this field in the acquireSelectorStart handler. For example, if an RGB image without alpha channels is being returned, this field should be set to 3. Even though Import modules can create documents with up to 24 channels, because of the implementation of the plane map, Import and Format modules should never try to work with more than 16 planes at a time.

The horizontal resolution of the image in terms of pixels per inch.

This is a fixed point number (16 binary digits). Photoshop initializes this field to 72 pixels per inch. The plug-in should set this field in the acquireSelectorStart handler.

The vertical resolution of the image in terms of pixels per inch.

This is a fixed point number (16 binary digits). Photoshop initializes this field to 72 pixels per inch. The plug-in should set this field in the acquireSelectorStart handler.

Note:
The current version of Photoshop only supports square pixels, so it ignores the imageVRes field. Plug-ins should set both imageHRes and imageVRes anyway in case future versions of Photoshop support non-square pixels.

The red color table of the image.

If an indexed color mode image is being returned, the plug-in should set this field in the acquireSelectorStart handler.

The green color table of the image.

If an indexed color mode image is being returned, the plug-in should set this field in the acquireSelectorStart handler.

The blue color table of the image.

If an indexed color mode image is being returned, the plug-in should set this field in the acquireSelectorStart handler.

The buffer where image data is stored.

The plug-in should return a pointer to this buffer in the acquireSelectorContinue handlers. After the entire image has been processed, the continue selector handler should set this field to NULL.

The plug-in is responsible for freeing any memory pointed to by this field. This is a change from previous versions of the Photoshop Import interface.

Deprecated:
Use AcquireRecord::theRect32.

The area of the image being returned. The plug-in should set this field in the acquireSelectorContinue handler. See AcquireRecord::theRect32 for large document support.

The first plane being returned.

The plug-in should set this field in the acquireSelectorContinue handler. For example, if interleaved RGB data is being used, it should be set to 0.

The last plane being returned.

The plug-in should set this field in the acquireSelectorContinue handler. For example, if interleaved RGB data is being used, it should be set to 2.

The offset in bytes between columns of data in the buffer.

The acquireSelectorContinue handler should set this field. This is usually 1 for non-interleaved data, or hiPlane-loPlane+1 for interleaved data.

The offset in bytes between rows of data in the buffer.

The acquireSelectorContinue handler should set this field.

The offset in bytes between planes of data in the buffers.

The acquireSelectorContinue handler should set this field. This field is ignored if loPlane=hiPlane. It should be set to 1 for interleaved data.

Document file name.

By default, Photoshop opens newly imported images as "Untitled-..." . For file-importing Import modules, set this field to the filename in the acquireSelectorStart routine. Photoshop will display the correct window title. Scanning modules should ignore this field.

Deprecated:
Volume reference number.

Should be set to zero.

Indicates whether the user is prompted to save the image when closing the window.

By default, newly imported images are marked as dirty, meaning that the user is prompted to save the image when closing the window. Set this field to FALSE to prevent this. This does not reflect whether there are unsaved changes in the current document.

The signature of the host, provided by the host.

The signature for Photoshop is signature is 8BIM.

A pointer to a host-defined callback procedure.

May be NULL.

The image modes supported by the host.

If the corresponding bit is 1, (where LSB = bit 0), the mode is supported. This field can be used by plug-ins to disable features such as color scanning if not supported by the host. See Image Modes for supported current modes.

Maps plug-in plane (channel) numbers to host plane numbers.

The host initializes it to a linear map: planeMap[i]=i. The plug-in may change this mapping if it sees the data in a different order.

For example, Photoshop stores RGB images with an alpha channel in the order RGBA, whereas most frame buffers store the data in ARGB order. To work with the data in this order, the plug-in should set planeMap[0]=3, planeMap[1]=0, planeMap[2]=1, and planeMap[3]=2.

Note:
Attempting to index past the end of a planeMap results in the identity map used for the indexing.

Indicates whether the host supports transposing images during or after scanning.

When TRUE, the host supports transposing. Photoshop always sets this field to TRUE.

Indicates whether the plug-in needs the image transposed.

Initialized by the host to FALSE. If the plug-in wishes to transpose the image, and canTranspose=TRUE, it should set this field to TRUE in the acquireSelectorContinue handler.

The logical effect is to transpose the image after scanning is complete, although some hosts may find it more efficient to transpose the data during scanning.

This feature was added to the plug-in specification because versions of Photoshop prior to Photoshop 2.5 had a strong bias toward horizontal strips. Using this routine, a plug-in could import an image in vertical strips by passing Photoshop horizontal strips and then having Photoshop transpose the data when it was done.

A handle for duotone information.

If your plug-in module is acquiring a duotone mode image, it should allocate a handle and return the duotone information in this field. The format of the information is the same as that provided by export modules.

Your plug-in is responsible for freeing the handle in its acquireSelectorFinish handler.

Deprecated:
Use AcquireRecord::diskSpace64.

The number of free bytes on the host’s scratch disk or disks. If the plug-in host does not use a scratch disk, this is -1. See AcquireRecord::diskSpace64 for large document support.

A pointer to the SpaceProc callback.

May be NULL.

Monitor setup information for the host.

Platform specific information.

Not used under Mac OS. See PlatformData in PITypes.h.

A pointer to the Buffer suite if it is supported by the host, otherwise NULL.

See Buffer Suite Callbacks (deprecated Standard Suite).

A pointer to the Pseudo-Resource suite if it is supported by the host, otherwise NULL.

See chapter Resource Suite Callbacks.

A pointer to the ProcessEventProc callback if it is supported by the host, otherwise NULL.

Indicates whether host supports reading back image data for further processing, set to TRUE if it does.

Photoshop always sets this field to TRUE.

Indicates whether the plug-in wants to read the data back.

If the plug-in module sets this flag and the host supports image read back, then the host ignores the contents of the buffer it is passed and instead fills the buffer with the image data. It stores the data in the format described by loPlane, hiPlane, colBytes, rowBytes, planeBytes, and planeMap. If theRect exceeds the bounds of the image, those portions of the buffer are left untouched.

Indicates that the plug-in wants to acquire another image once it has completed importing an image.

If you want your plug-in to be called again to import another image, set this flag in the acquireSelectorFinish handler. Plug-in hosts that support multiple image imports should start the import process again with a call to acquireSelectorStart.

If you do not want to put up a user interface for each import, you should display your interface during the acquireSelectorPrepare handler. With the addition of acquireSelectorFinalize, import plug-in modules can now put up an interface that remains active across multiple imports.

A plug-in module should not count on being called again just because it sets this flag; acquireSelectorFinish should still do all of the necessary cleanup.

Note:
Plug-in hosts can choose to treat acquireAgain as FALSE.

Indicates whether the host can invoke the finalize selector; TRUE if it can.

A pointer to the DisplayPixelsProc callback if it is supported by the host, otherwise NULL.

A pointer to the Handle callback suite if it is supported by the host, otherwise NULL.

See Handle Suite Callbacks (deprecated Standard Suite).

Indicates that the plug-in wants an acquireSelectorFinalize call if the host provides the newer protocol.

See canFinalize.

Provides alignment to a four byte boundary.

A pointer to the ColorServices callback if it is supported by the host, otherwise NULL.

AdvanceState callback.

Valid to call only within an acquireSelectorContinue call.

Image Services callback suite.

The width of the tiles provided by the host.

This is the best unit to work with, if possible. Zero if not set.

The height of the tiles provided by the host.

This is the best unit to work with, if possible. Zero if not set.

The origin point of the tiling system.

Property callback suite.

The plug-in needs to dispose of the handle returned for complex properties. The plug-in also maintains ownership of handles for set properties.

An error reporting string to return to Photoshop.

If the plug-in returns with result=errReportString then this string is displayed as: "Cannot complete operation because " + errorString.

Indicates whether the first alpha channel contains transparency; TRUE if it does.

Fill character.

Fill character.

Fill character.

Maximum value of data; only used for 16 bit data.

SPBasicSuite* AcquireRecord::sSPBasic

PICA basic suite.

Provides the mechanism to access all PICA suites.

Plug-in reference used by PICA.

If IndexedColor, and < 256, this is the index of the transparent color (for GIF).

]

Handle containing the ICC profile for the image; NULL if none.


The handle must be allocated using the Photoshop handle suite. Photoshop uses the data after the Finish call and then frees the handle.

Size of iCCprofileData.

Indicates if the host uses ICC Profiles.

Non-zero if the host can accept or export ICC profiles. If this is zero, don't set or dereference iCCprofileData.

Pointer to c-string that contains TWAIN data source name.

Used for push scanning on Windows.

Number of entries in the indexed color table.

This should include the transparent index if any. Plug-ins should pad out the color table with black for backward compatibility.

Indicates whether the host supports conversion after reading; 0 if it does not, -1 if it does.

The plug-in can set this field to the index of a color mode and this is treated by the host as a request to automatically convert to that mode. Hosts can ignore this request but they will make the host+plug-in combination appear broken.

Indicates whether the host supports 32 bit plug-in API.

Indicates whether the plug-in is using the 32-bit fields; set to nonzero by the plug-in if it is.

Size of image in 32 bit coordinates.

Replaces AcquireRecord::imageSize

Rectangle being returned in 32 bit coordinates.

Replaces AcquireRecord::theRect

Free disk space on the host's scratch disk or disks.

Set to a negative number if host does not use a scratch disk. Replaces AcquireRecord::diskSpace which has a maximum of 2 GB

Null terminated UTF16 filename set by the plug-in.

Plug-in needs to allocate and dispose the memory for this string. Photoshop makes a copy of this string. If this field is not NULL, Photoshop ignores the filename field.

Suite for passing pixels through channel ports, used for the Stack Renderer plug-in.

(NULL otherwise)

Source document pixel data; used for the Stack Renderer plug-in.

(NULL otherwise)

Reserved for future use.

Set to zero


The documentation for this struct was generated from the following file: