This page provides an index for and description of the sample code provided with the Photoshop SDK.
Color Picker Samples
SampleCode/ColorPicker/NearestBase
NearestBase is a sample color picker plug-in that demonstrates simple returning of colors with no user interface.
Export Samples
History
History is a sample Export module primarily concerned with demonstrating the Pseudo-Resource callbacks. It works in conjunction with the Propetizer plug-in to maintain a series of history strings for a file.
PathsToPostScript
PathsToPostScript demonstrates using the getProperties callback and exporting pen path information. The sample only works on Macintosh platforms. Borrowing the porting concepts from the other examples, it is fairly straightforward port IllustratorExport to Windows. Please read the comments inside the sample source for important information regarding pen paths and byte ordering.
Outbound
Outbound is a sample export module that writes a very basic image file from the data passed to it by the host.
Filter Samples
Dissolve
Dissolve is a sample filter plug-in which demonstrates the use of accessing pixel data using a tilling scheme. In previous versions of the SDK there was the combination of Dissolve-Sans and Dissolve-With plug ins. This combines those two plug ins into one. Using the tilling scheme has increased the speed of this plug in by 2.
Propetizer
Propetizer is a utility filter that demonstrates different properties.
ColorMunger
ColorMunger is a utility filter that exercises the Color Services callback suite.
Hidden
Hidden is a utility filter for the AutomationFilter project found in the automation folder. Automation plug ins cannot access pixel memory directly but they can call Filter plug ins. The Hidden plug in allows the AutomationFilter plug in to read and write pixel data via the scripting system. See the AutomationFilter project for more details.
MFCPlugin
MFCPlugin is an example of using MFC in a Photoshop plug in. This is not a recommended way to implement your plug in. You only get the Microsoft operating system, memory management in MFC goes against using Photoshop call backs for acquiring memory, etc.
PoorMansTypeTool
PoorMansTypeTool is an example of using the Channel Ports Suite to read and write pixel data. This interface is much easier to understand than the AdvanceState mechanism that the other filter plug-ins use.
- Note:
- The Channel Ports Suite is not implemented on other host adapters. Notably the ImageReady interface does not support the Channel Ports Suite.
Format Samples
SimpleFormat
SimpleFormat is a sample Format module. The name may be misleading. This example shows many new features available and added over time to the file format plu-in interface. The example deals with transparency, 32 bit documents, large documents, pseudo-resources, etc. This module is written to use the AdvanceStateProc callback, introduced in Photoshop 3.0.
Import Samples
GradientImport
GradientImport is a sample import module. This version of GradientImport requires at least Photoshop 3.0, since it uses the advanceState callback and the improved multiple import design. It is also updated for scripting and has a detailed example of exporting scripting information for multiple import structures.
Selection Samples
SelectoramaShape
Selectorama is a sample selection plug-in that demonstrates pixel selection based on certain criteria. Shape is a sample selection plug-in that demonstrates creating paths. These two plug-ins come in one binary. This example shows how to manage two plug-ins in one project.
Stack Renderer Samples