|
Getting Started
SDK API Reference
SDK API Features
Other Documentation
|
|
|
Channel Ports Suite Callbacks (DEPRECATED Standard Suite)The standard Channel Ports Suite has been DEPRECATED, please use the Channel Ports Suite Callbacks See PIChannelPortsSuite.h.
More...
|
Data Structures |
struct | PixelMemoryDesc |
| Describes an area of memory as pixels. More...
|
struct | PSScaling |
| Provide a scaling through a rectangle in source space and a corresponding rectangle in destination space. More...
|
struct | WriteChannelDesc |
| The channel to write a selection to. More...
|
struct | ReadChannelDesc |
| A channel to read from. More...
|
struct | ReadLayerDesc |
| A layer to read. More...
|
struct | ReadImageDocumentDesc |
| The document information, used by the Export, Filter, and Selection module parameter blocks. More...
|
struct | ChannelPortProcs |
| The set of routines available for teh Channel Ports Suite. More...
|
Channel Ports Suite Callbacks |
typedef MACPASCAL OSErr(*) | ReadPixelsProc (ChannelReadPort port, const PSScaling *scaling, const VRect *writeRect, const PixelMemoryDesc *destination, VRect *wroteRect) |
| Reads a rectangular area (tile) of pixels from a read port, and writes them to a destination buffer, based on a scaling and a description of the memory to write.
|
typedef MACPASCAL OSErr(*) | WriteBasePixelsProc (ChannelWritePort port, const VRect *writeRect, const PixelMemoryDesc *source) |
| Writes a rectangular area (tile) of pixels to a given port based on a memory description.
|
typedef MACPASCAL OSErr(*) | ReadPortForWritePortProc (ChannelReadPort *readPort, ChannelWritePort writePort) |
| Returns the read port corresponding to a write port.
|
Defines |
#define | kCurrentMinVersWriteChannelDesc 0 |
| Current minimum version of WriteChannelDesc .
|
#define | kCurrentMaxVersWriteChannelDesc 1 |
| Current maximum version of WriteChannelDesc .
|
#define | kCurrentMinVersReadChannelDesc 0 |
| Current minimum version of ReadChannelDesc .
|
#define | kCurrentMaxVersReadChannelDesc 5 |
| Current maximum version of ReadChannelDesc .
|
#define | kCurrentMinVersReadLayerDesc 0 |
| Current minimum version of ReadLayerDesc .
|
#define | kCurrentMaxVersReadLayerDesc 3 |
| Current maximum version of ReadLayerDesc .
|
#define | kCurrentMinVersReadImageDocDesc 0 |
| Current minimum version of the ReadImageDocumentDesc .
|
#define | kCurrentMaxVersReadImageDocDesc 5 |
| Current maximum version of the ReadImageDocumentDesc .
|
#define | kCurrentChannelPortProcsVersion 1 |
| Current version of the Channel Ports Suite.
|
#define | kPIChannelPortSuite "Photoshop Channel Ports Suite for Plug-ins" |
| Unique identifier for the Channel Ports Suite.
|
#define | kPIChannelPortSuiteVersion kCurrentChannelPortProcsVersion |
| Version number for the Channel Ports Suite.
|
#define | kCurrentChannelPortProcsCount ((sizeof(ChannelPortProcs) - offsetof(ChannelPortProcs, readPixelsProc)) / sizeof(void *)) |
| Current number of routines in the Channel Ports Suite.
|
Typedefs |
typedef _PIChannelPortDesc * | PIChannelPort |
| Access to internal channels though abstract types.
|
typedef PIChannelPort | ChannelReadPort |
| Channel read port.
|
typedef PIChannelPort | ChannelWritePort |
| Channel write port.
|
Detailed Description
The standard Channel Ports Suite has been DEPRECATED, please use the Channel Ports Suite Callbacks See PIChannelPortsSuite.h.
Channel Ports are access points for reading and writing data from Photoshop internal selection data structures. There are two types of ports: read ports and write ports. You can retrieve a read port corresponding to a write port, but you cannot retrieve a write port from a read port. The API does allow for write-only ports, although none exist as of this version of the suite. These structures are used to get at merged pixel information, such as iterating through the merged data of the current layer or entire document, to be able to return a selection or use for a preview proxy.
For more information, please see Selection Module, especially see selectionSelectorExecute.
The standard Channel Ports Suite is found as a pointer in the parameter blocks of the plug-in modules. You can access the routines within the Channel Ports Suite in the following manner: DLLExport MACPASCAL void PluginMain (const int16 selector,
void *exportParamBlock,
int32 *data,
int16 *result)
{
...
ChannelPortProcs *channelPortsSuite =
((ExportRecordPtr)exportParamBlock)->channelPortProcs;
channelPortsSuite->readPixelsProc(...);
...
}
Define Documentation
#define kCurrentMinVersWriteChannelDesc 0 |
#define kCurrentMaxVersWriteChannelDesc 1 |
#define kCurrentMinVersReadChannelDesc 0 |
#define kCurrentMaxVersReadChannelDesc 5 |
#define kCurrentMinVersReadLayerDesc 0 |
#define kCurrentMaxVersReadLayerDesc 3 |
#define kCurrentMinVersReadImageDocDesc 0 |
#define kCurrentMaxVersReadImageDocDesc 5 |
#define kCurrentChannelPortProcsVersion 1 |
Current version of the Channel Ports Suite.
#define kPIChannelPortSuite "Photoshop Channel Ports Suite for Plug-ins" |
Unique identifier for the Channel Ports Suite.
#define kPIChannelPortSuiteVersion kCurrentChannelPortProcsVersion |
Version number for the Channel Ports Suite.
Current number of routines in the Channel Ports Suite.
Typedef Documentation
Access to internal channels though abstract types.
Reads a rectangular area (tile) of pixels from a read port, and writes them to a destination buffer, based on a scaling and a description of the memory to write.
First, the destination space rectangle, provided in scaling , is projected back to the source space. Then the overlap with the channel read port is copied to a specified memory buffer. - Parameters:
-
| port | The channel port to read from. |
| scaling | A scaling between source and destination rectangles. |
| writeRect | The rectangular area (or tile) of the port to read. Usually this is the same as the rectangle specified in scaling.sourceRect . |
| destination | A description of the memory to write. The pixels read from the port are written into the memory buffer provided by destination.data |
| wroteRect | [OUT] The rectangular area (tile) in the destination space that was actually written. If the plug-in reads an area that fits entirely within the channel, this matches the scaling.destinationRect . If the plug-in reads an area that doesn't fit entirely within the channel, the destination pixels without corresponding source pixels won't be written to the destination.data buffer, and wroteRect reflects the actual area written. |
- Returns:
- An error upon failure.
Writes a rectangular area (tile) of pixels to a given port based on a memory description.
This callback does not support scaling. If the rectangle maps to any pixels beyond the bounds of the port, they won’t be written. - Parameters:
-
| port | The channel write port. |
| writeRect | [IN/OUT] As input, provides the rectangular area (tile) of source.data the pixels are written from. As output, reflects the area of the port actually written. If the input rectangle maps to pixels beyond the bounds of the port, the output rectangle reflects the area actually written. |
| source | A description of the memory to write. The actual pixels that are written to the port are provided in source.data . |
- Returns:
- An error upon failure.
Returns the read port corresponding to a write port.
- Parameters:
-
| readPort | [OUT] The read port. |
| writePort | The write port for which to retrieve the corresponding read port. |
- Returns:
- An error upon failure.
|
|