Types of plug-in modules

Sections on this Page

Adobe Photoshop plug-in modules are separate files containing code that extend Photoshop without modifying the base application.

Photoshop supports a public interface for seven types of plug-in modules:

Automation Automation modules access all Photoshop scriptable events. These modules appear under the Automate menu or Help menus. These modules are documented in Automation Module and Photoshop Actions Event Guide.

Color Picker Color Picker modules provide a plug-in interface for implementation of different color picker’s in addition to Photoshop’s and the system’s color pickers. They appear whenever the user requests a unique or custom color (such as clicking on the foreground or background colors in the tools palette) and are selected in the Preferences... General dialog. These modules are documented in Color Picker Module and in Writing Color Picker Plug-ins.

Export Export modules output an existing image. Export modules can be used to print to Mac OS printers that do not have Chooser-level driver support, or to save images in unsupported or compressed file formats. These modules are accessed through the Export sub-menu. These modules are documented in Export Module, and in Writing Export Plug-ins.

Filter Filter modules modify a selected area of an existing image. These modules appear under the Filter menu. Filter modules are the plug-ins that the majority of Photoshop users are most familiar with. These modules are documented in Filter Module, and in Writing Filter Plug-ins.

Format Format modules, also called File Format and Image Format modules, provide support for reading and writing additional image formats. These appear in the format pop-up menu in the Open, Save As and Save a Copy dialogs. These modules are documented in Format Module, and in Writing Format Plug-ins.

Stack Renderer Stack Renderer modules operate on an image stack, defined as a Smart Object. These modules appear under the Layer > Image Stacks > Image Stack Rendering menu. These modules are documented in Stack Renderer Modules, and in Writing Stack Renderer Plug-ins..

Import Import modules open an image in a new window. Import modules can be used to interface to scanners or frame grabbers, read images in unsupported or compressed file formats, or to generate synthetic images. These modules are accessed through the Import sub-menu. These modules are documented in Import Modules and in Writing Import Plug-ins.

Measurement Measurement modules add items to measure. Measurement items can be configured from the Analysis > Select Data Points dialog. Measurements can be performed from the measurement log palette or the Analysis > Record Measurements menu item.

Selection Selection modules modify which pixels are chosen in an existing image and can return either path or pixel selections. These modules appear under the Selection menu. These modules are documented in Selection Module, and in Writing Selection Plug-ins..

3D There is five ways to extend functionality with 3D modules. All modules work through the 3D scene description. Modules have control over cameras (perspective and orthographic), lights (spot, point, directional, infinite), meshes (made up of Faces, each with Material), animation (keyframes, position, rotation, scale)

  • File Format - Read and write 3D files directly
  • Modeler - Take a 3D scene modify it and return new scene
  • Render - Take a 3D scene and flatten by sending back pixel data
  • 3D Generation from 2D - Take in pixel data and return a 3D scene
  • Controller - Direct control of 3D state while in a 3D tool

Plug-in module files

Plug-in module files must reside in specific directories for Adobe Photoshop to recognize them. Under the Mac OS, plug-in files must be in:
  • the same folder as the Adobe Photoshop application, or
  • the folder identified in the Photoshop preferences dialog, or
  • a sub-folder of the folder identified in the Photoshop prefs.

Under Windows, plug in files must be in the directory "Plug-Ins" that is located next to the application. The HKEY_CURRENT_USER\Software\Adobe\Photoshop\10.0\PlugInDirectory is an optional location to install plug-ins. For older versions of Photoshop use the /c PLUGINDIRECTORY profile string in the Photoshop INI file.

Names for the Photoshop INI file
Version Filename
2.x PHOTOSHP.INI
3.x PHOTOS30.INI
4.x PHOTOS40.INI
5.x PHOTOS50.INI

Usually, a plug-in module file contains a single plug-in. You can create files with multiple plug-in modules. This is discouraged, because it reduces the user’s control of which modules are installed. There are situations when it may be appropriate to have more than one module in a single plug-in file. One example is matched import/export modules, although these are usually implemented as a file format module. Another example is a set of closely related filters, since the reduction of user control is offset by the increased ease of plug-in file management.

Plug-in file types and extensions

Plug-in module files should follow the guidelines in the table below for the type identifier under the Mac OS, and the file extension under Windows. While these are only recommendations with Adobe Photoshop 3.0, these must be used if your plug-in module runs with earlier versions of Photoshop.

Plug-in file types and extensions
Plug-in Type Macintosh File Type Windows File Extension
General (any type of plug-in) 8BPI .8BP
Automation 8LIZ .8LI
Color Picker 8BCM .8BC
Export 8BEM .8BE
Extension 8BXM .8BX
Filter 8BFM .8BF
File Format 8BIF .8BI
Import 8BAM .8BA
Measurement 8MEA .8ME
Parser 8BYM .8BY
Selection 8BSM .8BS
Stack Renderer 8BAM .8BA

On the Macintosh, plug-ins with the same creator ID as Adobe Photoshop ('8BIM') appear with the standard plug-in icons defined in Photoshop.

Basic data types

The basic types shown in the following table are commonly used in the Photoshop plug-in API. Most of these are declared in PITypes.h.

Basic data types
Name Description
int8, int16, int32 These are 8, 16 and 32 bit integers respectively.
uint8, uint16, uint32 These are unsigned 8, 16 and 32 bit integers respectively.
unsigned8, unsigned16, unsigned32 These are unsigned 8, 16 and 32 bit integers respectively.
short Same as int16.
long Same as int32.
Boolean Single byte flag where 0=FALSE; any other value=TRUE.
OSType int32 denoting Mac OS style 4-character code like 'PiPL'.
TypeCreatorPair Two OSTypes denoting filetype then creator code.
FlagSet Array of boolean values where the first entry is contained in the high order bit of the first byte. The ninth entry would be in the high–order bit of the second byte, etc.
CString C-style string where the content bytes are terminated by a trailing NULL byte.
PString Pascal style string where the first byte gives the length of the string and the content bytes follow.
Str255 Pascal style string where the first byte gives the length of the string and the content bytes follow, with a maximum of 255 content bytes.
Structures Structures are typically represented the same way they would be in memory on the target platform. Native padding and alignment constraints are observed. Several common structures, such as RGBtuple, are declared in PITypes.h.
VPoint, VRect Like Mac OS Point and Rect structures, but have 32-bit coordinates.