PIFilter.h File Reference

This file describes Photoshop's Filter module interface. More...

#include "PIActions.h"
#include "PIGeneral.h"
#include "PSGraphicTypes.h"
#include "SPBasic.h"

Go to the source code of this file.

Data Structures

struct  FilterCaseInfo
 Data for the filter case information property 'fici' PIFilterCaseInfoProperty. More...
struct  BigDocumentStruct
 Allows editing of documents beyond the 30,000 by 30,000 pixel limit mandated in earlier versions, a feature added in Photoshop CS (8.0). More...
struct  FilterRecord
 This structure is passed to the plug-in module through the parameter block. More...

Defines

#define PIFilterCaseInfoProperty   0x66696369L
 Filter Case information.
Filter Module Selectors
#define filterSelectorAbout   0
 Allows the plug-in to display an about box for the Export Module.
#define filterSelectorParameters   1
 Provides a means for the plug-in to prompt the user for any user-settable parameters.
#define filterSelectorPrepare   2
 Allows your plug-in module to adjust the Photoshop memory allocation algorithm.
#define filterSelectorStart   3
 Provides a means for your plug-in to validate the parameters block, update the parameters based on the passed scripting parameters, show its user interface, if requested, and then drop into its processing routine.
#define filterSelectorContinue   4
 Continually processes plug-in data as long as it is available.
#define filterSelectorFinish   5
 Allows the plug-in to clean up after a filtering operation.
Filter Case Identifiers: passed in filterCase field
#define filterCaseUnsupported   -1
 Host does not support this case.
#define filterCaseFlatImageNoSelection   1
 A background layer or a flat image.
#define filterCaseFlatImageWithSelection   2
 No transparency data, but a selection may be present.
#define filterCaseFloatingSelection   3
 Image data with an accompanying mask.
#define filterCaseEditableTransparencyNoSelection   4
 Layer with transparency editing enabled and no selection.
#define filterCaseEditableTransparencyWithSelection   5
 Layer with transparency editing enabled and a selection.
#define filterCaseProtectedTransparencyNoSelection   6
 Layer with transparency editing disabled and no selection.
#define filterCaseProtectedTransparencyWithSelection   7
 Layer with transparency editing disabled and a selection.
FilterCaseInfo Handling Modes
#define filterDataHandlingCantFilter   0
 Indicates that this case is not supported by the plug-in filter.
#define filterDataHandlingNone   1
 Indicates that the plug-in filter does not expect the plug-in host to do anything to the image data.
#define filterDataHandlingBlackMat   2
 Matte the image data with black (=0) values based on the transparency on input; dematte the image data using black values on output.
#define filterDataHandlingGrayMat   3
 Matte the image data with gray (=128) values based on the transparency on input; dematte the image data using gray values on output.
#define filterDataHandlingWhiteMat   4
 Matte the image data with white (=255) values based on the transparency on input; dematte the image data using white values on output.
#define filterDataHandlingDefringe   5
 Defringe transparent areas filling with the nearest defined pixels using taxicab distance.
#define filterDataHandlingBlackZap   6
 Set color component of totally transparent pixels to black.
#define filterDataHandlingGrayZap   7
 Set color component of totally transparent pixels to gray.
#define filterDataHandlingWhiteZap   8
 Set color component of totally transparent pixels to white.
#define filterDataHandlingFillMask   9
 Automatically fills the transparency mask with full opacity in the area affected by the filter.
#define filterDataHandlingBackgroundZap   10
 Set color component of totally transparent pixels to the current background color.
#define filterDataHandlingForegroundZap   11
 Set color component of totally transparent pixels to the current foreground color.
Filter Case Info Flag Bits
#define PIFilterDontCopyToDestinationBit   0
 Determines whether source data is copied to the destination before filtering.
#define PIFilterWorksWithBlankDataBit   1
 Determines whether the filter will work on "blank" areas that are completely transparent.
#define PIFilterFiltersLayerMaskBit   2
 In cases where transparency is editable, this flag determines if Layer Masks are filtered.
#define PIFilterWritesOutsideSelectionBit   3
 In the image with selection and layer with selection cases, does the filter want to write beyond the confines of the selection? (This is generally rude but in some cases its better than the alternatives.
Error Return Values
#define filterBadParameters   -30100
 The filter module had a problem with the filter module interface.
#define filterBadMode   -30101
 The filter module does not support <mode> images.

Typedefs

typedef struct FilterCaseInfo FilterCaseInfo
 Data for the filter case information property 'fici' PIFilterCaseInfoProperty.
typedef unsigned char FilterColor [4]
 Background or foreground color, in the color space native to the image.
typedef struct BigDocumentStruct BigDocumentStruct
 Allows editing of documents beyond the 30,000 by 30,000 pixel limit mandated in earlier versions, a feature added in Photoshop CS (8.0).
typedef struct FilterRecord FilterRecord
 This structure is passed to the plug-in module through the parameter block.
typedef struct FilterRecordFilterRecordPtr

Detailed Description

This file describes Photoshop's Filter module interface.

Distribution: PUBLIC


Define Documentation

#define PIFilterCaseInfoProperty   0x66696369L

Filter Case information.

Key value is 'fici'. This property key reflects the FilterCaseInfo property in the PiPL resource file. The case properties are an array of seven four byte entries (the FilterCaseInfo struct), one for each case identified in Filter Case Identifiers. Photoshop supports dynamically composited layers of image data. A layer consists of color and transparency information for each pixel it contains. Completely transparent pixels have an undefined color. Filters will likely affect transparency data as well as color data. This is especially true for filters which produce spatial distortions.

Photoshop offers flexibility in how transparency data is presented to filters. The filter case info property controls the filtering process and presentation of data to the plug-in. This property provides information to Photoshop about what image data cases the plug-in supports. Photoshop then compares the current filtering situation to the supported cases and chooses the best fitting case. The image data is then presented in that case. If none of the supported cases are usable, the filter will be disabled.


Typedef Documentation

Data for the filter case information property 'fici' PIFilterCaseInfoProperty.

typedef unsigned char FilterColor[4]

Background or foreground color, in the color space native to the image.

Allows editing of documents beyond the 30,000 by 30,000 pixel limit mandated in earlier versions, a feature added in Photoshop CS (8.0).

BigDocumentStruct was added to the FilterRecord to support this new feature. This structure deprecates imageSize, filterRect, inRect, outRect, maskRect, floatCoord, and wholeSize.