PIFormat.h File Reference

This file describes Photoshop's Image Format plug-in module interface. More...

#include <stdio.h>
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
#include "SPFiles.h"

Go to the source code of this file.

Data Structures

struct  FormatInfo
 Information about this Format Plug-in. More...
struct  FormatRecord
 This structure is passed to the plug-in module through the parameter block. More...

Defines

#define formatSelectorLaunchExternalEditor   41
#define PIFmtPRotate   0x66726F74
 Indicates how the file can be rotated in this format; key value is 'fro'.
#define PIFmtPVNotSupported   0
 The requested property is not supported by this format plug-in.
#define PIFmtPVRotateNo   2
 This file should not be rotated.
#define PIFmtPVRotateIsLossy   3
 This file can be rotated, but it will be loss.
#define PIFmtPVRotateIsLossless   4
 This file can be rotated and it will be losses.
#define PIFmtPVRotateIsLosslessWithCallback   5
 This file can be only be rotated losses by using the callback, otherwise it will be loss.
Format Module Selectors
#define formatSelectorAbout   0
 Allows the plug-in to display an about box for the Format Module.
#define formatSelectorReadPrepare   1
 Allows a plug-in module to adjust the Photoshop memory allocation algorithm.
#define formatSelectorReadStart   2
 Allows the plug-in module to begin its interaction with the host.
#define formatSelectorReadContinue   3
 Processes a sequence of areas within the image.
#define formatSelectorReadFinish   4
 Allows the plug-in to cleanup from the read operation just performed.
#define formatSelectorOptionsPrepare   5
 Allows a plug-in module to adjust the Photoshop memory allocation algorithm.
#define formatSelectorOptionsStart   6
 Allows a plug-in to determine whether the current document can be saved in the required file format, and if necessary, get any file options from the user.
#define formatSelectorOptionsContinue   7
 Allows a plug-in to request parts of the image, from which it determines whether it can store the file.
#define formatSelectorOptionsFinish   8
 Allows the plug-in to perform any necessary clean up.
#define formatSelectorEstimatePrepare   9
 Allows a plug-in module to adjust the Photoshop memory allocation algorithm.
#define formatSelectorEstimateStart   10
 Allows a plug-in to calculate the disk space needed to save the file.
#define formatSelectorEstimateContinue   11
 Allows a plug-in to request parts of the image from which it can compute the minimum and maximum bytes to store the file.
#define formatSelectorEstimateFinish   12
 Allows the plug-in to perform any necessary clean up.
#define formatSelectorWritePrepare   13
 Allows a plug-in module to adjust the Photoshop memory allocation algorithm.
#define formatSelectorWriteStart   14
 Allows a plug-in module to begin writing the file.
#define formatSelectorWriteContinue   15
 Provides the plug-in module some or all of the image data; the plug-in module should write this data to file.
#define formatSelectorWriteFinish   16
 Allows the plug-in to cleanup from the write operation just performed.
#define formatSelectorFilterFile   17
 Determines whether a plug-in can process a given file type.
#define formatSelectorGetFilePropertyValue   18
 Gets a file property value from the format plug-in.
#define formatSelectorLosslessRotate   19
 Requests the format plug-in to rotate a file losslessly.
#define formatSelectorBulkSettings   20
 Sets parameters for multiple files.
#define formatSelectorXMPRead   21
 Reads the XMP data from your file.
#define formatSelectorXMPWrite   22
 Writes the XMP data to your file.
#define formatSelectorBulkOpen   23
#define formatSelectorLoad   24
#define formatSelectorUnload   25
#define formatSelectorPreferences   26
#define formatSelectorSettingsCopy   27
#define formatSelectorSettingsPaste   28
#define formatSelectorSettingsClear   29
#define formatSelectorSettingsDefault   30
#define formatSelectorSettingsPrevious   31
#define formatSelectorSettingsPresetList   32
#define formatSelectorSettingsChecksum   33
#define formatSelectorXMPAppend   34
#define formatSelectorReadLayerStart   35
#define formatSelectorReadLayerContinue   36
#define formatSelectorReadLayerFinish   37
#define formatSelectorWriteLayerStart   38
#define formatSelectorWriteLayerContinue   39
#define formatSelectorWriteLayerFinish   40
PiPL Format Keys
#define PIFmtFileTypeProperty   0x666d5443 /* 'fmTC' <TypeCreatorPair> Default file type for file format. */
 Default type and creator code used for files newly created with this format plug-in; key value is 'fmTC'.
#define PIReadTypesProperty   0x52645479 /* 'RdTy' <TypeCreatorPair []> File type info for file format plug-ins */
 List of type and creator pairs that the format plug-in can read; key value is 'RdTy'.
#define PIFilteredTypesProperty   0x66667454 /* 'fftT' <TypeCreatorPair []> File types to filter for file format plug-ins */
 List of type and creator pairs for which the file format plug-in should be called to determine if the file can be read; key value is 'fftT'.
#define PIReadExtProperty   0x52644578 /**'RdEx' <OSType []> File type info for file format plug-ins */
 List of extensions which the format plug-in can read; key value is 'RdEx'.
#define PIFilteredExtProperty   0x66667445 /* 'fftE' <OSType []> File types to filter for file format plug-ins */
 List of extensions for which the file format plug-in should be called to determine if the file can be read; key value is 'fftE'.
#define PIFmtFlagsProperty   0x666d7466 /* 'fmtf' <Set> Format flags */
 A set of flags which control the operation of file format plug-ins; key value is 'fmtf'.
#define PIFmtHiddenFlagsProperty   0x666D6869 /* 'fmhi' Hidden read/write flags */
 Hidden read/write flags; key value is 'fmhi'.
#define PIFmtICCFlagsProperty   0x666D6970 /* 'fmip' ICC profile flags. */
 ICC profile flags; key value is 'fmip'.
#define PIFmtICCRequiredFlagsProperty   0x666D6972 /* 'fmir' ICC required profile flags.*/
 ICC required profile flags; key value is 'fmir'.
#define PIFmtMaxSizeProperty   0x6d78737a /* 'mxsz' <Point> Max rows and cols supported by this format. */
 The maximum number of rows and columns that can be in an image saved in this format; key value is 'mxsz'.
#define PIFmtMaxChannelsProperty   0x6d786368 /* 'mxch' <int16 []> Max channels per mode for this format. */
 An array of counts of the maximum number of channels which can/will be saved for a given image mode; key value is 'mxch'.
#define PIFmtFilePropertiesProperty   0x66667073 /* 'ffps' Supports formatSelectorGetFilePropertyValue selector. */
 Supports formatSelectorGetFilePropertyValue selector; key value is 'ffps'.
#define PIFmtLosslessRotateProperty   0x666C6C72 /* 'fllr' Supports formatSelectorLosslessRotate selector. */
 Supports formatSelectorLosslessRotate selector; key value is 'fllr'.
#define PIFmtBulkSettingsProperty   0x66666273 /* 'ffbs' Supports formatSelectorBulkSettings selector.*/
 Supports formatSelectorBulkSettings selector; key value is 'ffbs'.
#define PIFmtPrimaryMetadataProperty   0x6666706d /* 'ffpm' File format is primary metadata source.*/
 File format is primary metadata source; key value is 'ffpm'.
#define PIFmtPrimaryThumbnailProperty   0x66667074 /* 'ffpt' File format is primary thumbnail source. */
 File format is primary thumbnail source; key value is 'ffpt'.
#define PIFmtXMPReadProperty   0x786D7072 /* 'xmpr' Supports formatSelectorXMPRead selector.*/
 Supports formatSelectorXMPRead selector; key value is 'xmpr'.
#define PIFmtXMPWriteProperty   0x786D7077 /* 'xmpw' Supports formatSelectorXMPWrite selector. */
 Supports formatSelectorXMPWrite selector; key value is 'xmpw'.
#define PIFmtQuickThumbExtractProperty   0x7174686D /* 'qthm' Supports extractQuickThumbnail field. */
 Supports extractQuickThumbnail field; key value is 'qthm'.
#define PIFmtBulkOpenProperty   'ffbo' /* 'ffbo' Supports formatSelectorBulkOpen selector. */
 Supports formatSelectorBulkOpen selector; key value is 'ffbo'.
#define PIFmtRawSettingsProperty   'rscp' /* 'rscp' Supports settings copy/paste/etc selectors.*/
 Supports settings copy/paste/etc selector; key value is 'rscp'.
#define PIFmtOpenWriteAccessProperty   'fowa' /* 'fowa' Plug-in prefers write access when opening.*/
 Plug-in prefers write access when opening; key value is 'fowa'.
#define PIFmtWarnIfOverriddenProperty   'fwio' /* 'fwio' Warning if this plug-in is override by another. */
 Warning if this plug-in is override by another; key value is 'fwio'.
#define PIFmtResourceThreadSafeProperty   'frts' /* 'ft' Plug-in is resource fork thread safe. */
 Plug-in is resource fork thread safe; key value is 'frts'.
#define PIFmtSupportsLayersProperty   'fmsl' /* 'fmsl' plug-in supports layers */
#define PIFmtSupportsLayersReadOnlyProperty   'slRO' /* 'slRO' plug-in layer support is read-only */
#define PIFmtSupportsBackgroundSaveProperty   'fbgs' /* 'fbgs' plug-in supports background save */
 Plug-in can save a file out on a separate background thread.
#define PIFmtSupportsPOSIXIOProperty   'fxio' /* 'fxio' plug-in supports POSIX API for read and write */
 Plug-in can read and write files using POSIX API calls.
#define PIFmtFileSizeLimitProperty   0x66736c6d /* 'fslm' <int32 > Max size on disk your format can read and write. In gigabytes. */
 The maximum size on disk the format can read or write.
#define PIFmtSupportsPluginOpeningFile   'fpof' /* 'fpof' plug-in supports open and closing files for itself. */
 Plug-in prefers to open and close files itself.
Format Hidden Flags for PIFmtHiddenFlagsProperty
#define PIFmtShowReadFlag   0
#define PIFmtShowWriteFlag   1
Format Flags for PIFmtFlagsProperty
#define PIFmtReadsAllTypesFlag   0
#define PIFmtSavesImageResourcesFlag   1
 Controls whether Photoshop adds the image resources to the Mac OS resource fork.
#define PIFmtCanReadFlag   2
 Indicates that the plug-in can read files, when the flag is TRUE.
#define PIFmtCanWriteFlag   3
 Indicates that the plug-in can write files, when the flag is TRUE.
#define PIFmtCanWriteIfReadFlag   4
 Indicates that plug-in can write the file if the plug-in originally read the file, when the flag is TRUE.
#define PIFmtCanWriteTransparency   5
 Indicates that the plug-in supports saving the transparency index of indexed color image or saving transparency as a first alpha channel for other color modes, when the flag is TRUE.
#define PIFmtCanCreateThumbnail   6
 Indicates that the plug-in can create a Thumbnail, when the flag is TRUE.
#define PIFmtCanWriteSpotChannel   7
 Indicates that the plug-in can save spot channels when the flag is TRUE.
Format Flags ICC Profile Flags for PIFmtICCFlagsProperty
#define PIFmtICCEmbedGrayFlag   0
 Can embed profiles in gray scale images, when bit is set.
#define PIFmtICCEmbedIndexedFlag   1
 Can embed profiles in indexed color images, when bit is set.
#define PIFmtICCEmbedRGBFlag   2
 Can embed profiles in RGB images, when bit is set.
#define PIFmtICCEmbedCMYKFlag   3
 Can embed profiles in CMYK images, when bit is set.
Required Format ICC Profile Flags for PIFmtICCRequiredFlagsProperty
#define PIFmtICCRequireGrayFlag   0
 Requires embedding profiles in gray scale images, when bit is set.
#define PIFmtICCRequireIndexedFlag   1
 Requires embedding profiles in indexed color images, when bit is set.
#define PIFmtICCRequireRGBFlag   2
 Requires embedding profiles in RGB images, when bit is set.
#define PIFmtICCRequireCMYKFlag   3
 Requires embedding profiles in CMYK images, when bit is set.
Bit masks for the browserRotation field
#define PIFmtBrowserRotationFlipFlag   2
 Flip horizontal.
#define PIFmtBrowserRotationDisableFlag   3
 The FormatRecord::browserRotation field is disabled.
#define PIFmtBrowserRotationEnableFlag   4
 The FormatRecord::browserRotation field is enabled, and is read-write.
Bit masks for bulkMask and bulkFlags fields
#define PIFmtBulkOpenMask   1
#define PIFmtBulkInvalPreviewMask   2
#define PIFmtBulkInvalMetaMask   4
#define PIFmtBulkDeleteMask   8
#define PIFmtBulkModifyListMask   16
Format Error Return Values
#define formatBadParameters   -30500
 An error with the interface.
#define formatCannotRead   -30501
 No scanner installed.
#define formatSkipFile   -30502
 The host should skip processing this file.
#define formatPasswordProtected   -30503
 For PDF files.
#define formatUnsupportedRaw   -30504
 The file appears to be a raw file from a camera model which is not supported by the installed version of Camera Raw.
#define formatUnsupportedDNG   -30505
 The DNG file is not supported by the installed version of Camera Raw.

Typedefs

typedef struct FormatInfo FormatInfo
 Information about this Format Plug-in.
typedef struct FormatRecord FormatRecord
 This structure is passed to the plug-in module through the parameter block.
typedef struct FormatRecordFormatRecordPtr

Detailed Description

This file describes Photoshop's Image Format plug-in module interface.

Distribution: PUBLIC


Define Documentation

#define PIFmtPRotate   0x66726F74

Indicates how the file can be rotated in this format; key value is 'fro'.

The FormatRecord::browserRotation field needs to be filled out.

#define PIFmtPVNotSupported   0

The requested property is not supported by this format plug-in.

#define PIFmtPVRotateNo   2

This file should not be rotated.

#define PIFmtPVRotateIsLossy   3

This file can be rotated, but it will be loss.

#define PIFmtPVRotateIsLossless   4

This file can be rotated and it will be losses.

This file can be only be rotated losses by using the callback, otherwise it will be loss.


Typedef Documentation

typedef struct FormatInfo FormatInfo

Information about this Format Plug-in.