Plug-In API Overview

This section contains the required and optional implementable functions, as well as a description of each one for each type of plug-in. For sample code, see the sample plug-ins included in the "Sample" folder.

Command Extension (CX)

Required Functions:

Definitions:

CX_GetPlugInInfo

Called to retrieve the details of the plug-in, such as the plug-in title, the icon for the plug-in, and, most importantly, the number and details of the commands supported by the plug-in.

CX_Init

Called to initialize the plug-in. This will be called before any other function.

CX_InvokeCommand

Invokes a specified command on a set of files.

Optional Functions:

CX_ShowPlugInDialog

Shows an "About" dialog for the plug-in.

CX_Free

Called to un-initialize the plug-in. This will be called after a matching Init call.

CX_Help

Displays a help document for either the plug-in or a specified command.

CX_ErrorHandler

Exception handler for a plug-in-caused exception.

CX_FormatInfoChanged

Called to determine if the cached information about the commands that are supported by the plug-in should be updated.

Image Decoder (ID)

Required Functions:

Definitions:

ID_CloseImage

Called once the plug-in is no longer needed to decode an image. This is where any memory allocated for the decoding reference by the ID_StateHdl should be freed.

ID_GetImageInfo

Called to retrieve information about the image being decoded.

ID_GetPageInfo

Called to retrieve information about a specific page being decoded.

ID_GetPlugInInfo

Called to retrieve the details of the plug-in, such as the plug-in title, the icon for the plug-in, and, most importantly, the number and details of the commands supported by the plug-in.

ID_Init

Called to initialize the plug-in. This will be called before any other function.

ID_OpenImage

Called to start the decoding of an image. The plug-in should store any state related to decoding the image in an object pointed to by ID_StateHdl. This state will be passed back to the plug-in in all subsequent calls related to that image.

ID_PageDecode

Decodes a page of the image into a Windows bitmap.

Additionally, the plug-in may export other optional functions.

Optional Functions:

ID_CreateView

Creates a CWnd (MFC)-derived window that will be displayed in the application. This should be used to implement a custom view of the image format. See the CreateView sample plug-in for more details.

ID_ErrorHandler

Exception handler for a plug-in-caused exception.

ID_FormatInfoChanged

Called to determine if the cached information about the image formats supported by the plug-in should be updated.

ID_Free

Called to un-initialize the plug-in. This will be called after a matching Init call.

ID_GetError

Called after the plug-in returned a non-standard error. Returns an error string that is relevant to the error code.

ID_GetMetadataList

Called to retrieve all or some metadata from an image. The metadata is returned in a linked list.

ID_GetRAWRotateInfo

Called to retrieve the rotate and flip values that should be applied to a RAW file.

ID_GetSupportedMetadata

Retrieves a list of the supported metadata types for an image format.

ID_Help

Displays a help document for either the plug-in or a specified image format.

ID_IsAutoRotated

Returns true if the plug-in has auto-rotated the image when decoding, false if not.

ID_PageDecodeStart

Called to start incremental page decoding.

ID_PageDecodeStep

Does one step of incremental page decoding.

ID_PageDecodeStop

Called to finish incremental page decoding.

ID_PreTranslateMessage

Pre-translates message handler for the plug-in view created by ID_CreateView.

ID_ShowPlugInDialog

Shows an "About" dialog for the plug-in.

Image Encoder (IE)

Required Functions:

Definitions:

IE_GetPlugInInfo

Called to retrieve the details of the plug-in, such as the plug-in title, the icon for the plug-in, and, most importantly, the number and details of the commands supported by the plug-in.

IE_GetValidPixelFormats

Called to retrieve an enumeration of the valid pixel formats of bitmaps that can be passed to the plug-in as input for image encoding of the specified format.

IE_ImageEncode

Writes a single page image to disk.

IE_Init

Called to initialize the plug-in. This will be called before any other function.

IE_ShowPlugInDialog

Shows an "About" dialog for the plug-in.

Additionally, the plug-in may export other optional functions.

Optional Functions:

IE_ErrorHandler

Exception handler for a plug-in-caused exception.

IE_FormatInfoChanged

Called to determine if the cached information about the image formats supported by the plug-in should be updated.

IE_Free

Called to un-initialize the plug-in. This will be called after a matching Init call.

IE_GetDefaultEncodeParams

Initializes and returns a default encoding parameters struct for the given format type.

IE_GetError

Called after the plug-in returned a non-standard error. Returns an error string that is relevant to the error code.

IE_GetNativelySupportedMetadata

Retrieves a list of GUIDs representing the natively supported metadata types of the image format.

IE_GetSupportedMetadata

Retrieves a list of GUIDs representing the supported metadata types of the image format.

IE_Help

Displays a help document for either the plug-in or a specified image format.

IE_ImageEncodeFinish

Ends image encoding for an image. The plug-in should free any memory referenced by IE_StateHdl.

IE_ImageEncodePage

Appends or replaces a page in the current image being encoded.

IE_ImageEncodeStart

Starts image encoding for an image. The plug-in should store any state related to encoding the image in an object pointed to by IE_StateHdl. This state will be passed back to the plug-in in all subsequent calls related to that image.

IE_ImageEncodeToBuffer

Encodes a single page image to a memory buffer, instead of to disk.

IE_SetMetadataList

Sets metadata for a specific page of an image.

IE_ShowEncodeParamsDialog

Displays a dialog box allowing the user to customize the encoding options for the specified format.

Image Filter (IF)

Required Functions:

Definitions:

IF_Init

Called to initialize the plug-in. This will be called before any other function.

IF_GetPlugInInfo

Called to retrieve the details of the plug-in, such as the plug-in title, the icon for the plug-in, and, most importantly, the number of and details of the commands supported by the plug-in.

as well as

IF_RunFilter

Runs a filter on an image using ACDSee’s GUI. Parameters were specified in the IF_UISpecification for the filter.

and/or

IF_RunMenuFilter

Runs a filter from a menu. Any UI must be fully implemented by the plug-in. If the user set parameters for the filter, return those parameters via outParams so that ACDSee can re-run the filter via ACDSee Actions later.

IF_RunMenuFilterAction

Runs a menu filter during an action playback. Similar to RunMenuFilter but with no user interaction.

IF_FreeAllocatedParams

Frees the parameters returned via IF_RunMenuFilter.

Additionally, the plug-in may export other optional functions.

Optional Functions:

IF_ErrorHandler

Exception handler for a plug-in-caused exception.

IF_Free

Called to un-initialize the plug-in. This will be called after a matching Init call.

IF_Help

Displays a help document for either the plug-in or a specified filter.

IF_ShowPlugInDialog

Shows an "About" dialog for the plug-in.

See also: