Channel Ports Suite Callbacks

Channel Ports are access points for reading and writing data from Photoshop internal channel data structures. More...

Data Structures

struct  PSChannelPortsSuite1
 The set of routines available in the Channel Ports Suite. More...

Defines

#define kPSChannelPortsSuite   "Photoshop ChannelPorts Suite for Plug-ins"
 Unique identifier for the Channel Ports Suite.
#define kPSChannelPortsSuiteVersion2   2
 Channel Ports Suite version 2.
#define kPSChannelPortsSuiteVersion3   3
 Channel Ports Suite version 3.

Typedefs

typedef struct PSChannelPortsSuite1 PSChannelPortsSuite1
 The set of routines available in the Channel Ports Suite.

Detailed Description

Channel Ports are access points for reading and writing data from Photoshop internal channel 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, refer Selection Module, especially see selectionSelectorExecute.

Accessing the Suite

The Channel Ports suite is referred to as:

  #define kPSChannelPortsSuite          "Photoshop ChannelPorts Suite for Plug-ins"

There are two version constants available:

  #define kPSChannelPortsSuiteVersion2          2   
  #define kPSChannelPortsSuiteVersion3          3  

The suite is acquired as follows:

  PSChannelPortsSuite1 *sPSChannelPorts;
 
  // Acquiring version 3.
  error = sSPBasic->AcquireSuite(kPSChannelPortsSuite,
                                 kPSChannelPortsSuiteVersion3,
                                 &sPSChannelPorts);

  if (error) goto . . . //handle error

For PICA errors, see SPErrorCodes.h.


Define Documentation

#define kPSChannelPortsSuite   "Photoshop ChannelPorts Suite for Plug-ins"

Unique identifier for the Channel Ports Suite.

Channel Ports Suite version 2.

Channel Ports Suite version 3.


Typedef Documentation

The set of routines available in the Channel Ports Suite.