![]() |
Adobe Photoshop SDK |
|
New for CS6?Photoshop is now running native on 64 bit processors ONLY on Macintosh OS X. Photoshop plug-ins built for 32 bit processors will not load in Photoshop CS6. Please see the SixtyFourMacintosh section "here" for porting a plug-in to 64 bit processors. Microsoft Visual Studio 2010 with Service Pack 1, 32 and 64 bit builds Xcode Version 3.2.5, GCC 4.2, SDK 10.6, 64 bit only builds It is recommended that you use the same build settings for your project. Photoshop CS6 has new API's for accessing large amounts of data. Although it is not recommended to request large amounts of memory, some algorithms require the entire image. Use the following routines:
PIBufferSuite.h - New64 - GetSize64 - GetSpace64 PIGeneral.h BufferProcs - AllocateBufferProc64 - BufferSpaceProc64 For BufferProcs usage make sure to check the value of numBufferProcs and also check routines for NULL before accessing them. This will allow runtime checks when running on older versions of Photoshop. ReadImageDocumentDesc has a new property of SPPlatformFileSpecificationW *fileSpecW. This allows for proper access of files with unicode characters. The SPPlatformFileSpecification_t *fileSpec is now deprecated. FilterRecord has two new properties to access the current working profile information for the document. iCCWorkingProfileData and iCCWorkingProfileSize. Use this information along with iCCprofileData and iCCprofileSize to color convert if a plug-in is not using the displayPixels routine.
Photoshop CS6 now supports background save of documents. A Format plug-in can save a file out on a separate background thread. This property key reflects the Automation plug-ins that listen to the save event are now going to receive two events when Photoshop is doing a background save. The first event is when the saving starts. The second event is when the saving ends. If a document is in the middle of a background save and the user saves again, the listener plug-in would see two starts and two ends. If a third save is started the second and third save will be consolidated into one and the listener plug-in would see three starts and two ends. Only the user can abort a save in progress. A listener will have to take this into account as you may receive more starts than ends. Four new properties in PIProperties.h propScratchVolumeList - Photoshop scratch disk volumes. A list of 4-byte volume index that users have picked as preferred scratch volumes. On windows, this index is 1 based, started from "A:\", so "C:" drive will be 3, "G:" will be 7, etc. propGPUFlags - This property reflects the current state of the GPU card and the users settings in Preferences. Use this to determine the GPU usage in a plug-in. propVRAM_MB - This returns the available VRAM in units of 1024*1024. propLayerIsSmart - Use this property to tell if the current layer is a smart object layer. New for CS5?Photoshop is now running native on 64 bit processors on Macintosh OS X. See more information about making 64 bit plug-ins for Macintosh OS X here.New for CS4?Photoshop is now running native on 64 bit processors on Windows Vista. See more information about making 64 bit plug-ins for Windows Vista here.New for CS3?A large portion of the documentation has moved to an HTML format produced from doxygen. You are reading that right now. This gives a better overall picture of the SDK and easier navigation between topics. The sections to the left are the primary navigation for the SDK documentation.Adobe Photoshop CS3 is now a Universal binary. Your plug-in needs to be a Universal binary as well to support the MacTel operating system. Apple's Xcode development environment is the recommended way to create a Universal binary. See the Making Xcode Projects for Mac OS section to learn how to move your plug-in to the Xcode environment. All shipping plug-ins are using the bundle method. You see one file that looks like a plug-in but it is actually a bundle with all the parts inside. See the section below Bundling Plug-Ins. Two new plug-in types for this version.
3D support
File Format plug-ins can now open multi-layered files. Smart filters for non-destructive editing. See Dissolve example.
Bundling Plug-InsPlug-ins that ship with Adobe Photoshop CS3 and later are now inside bundles. Below is the directory layout for the Dissolve plug-in. The Xcode project settings are given below.
Dissolve.plugin/Contents/MacOS/Dissolve Dissolve.plugin/Contents/Info.plist Dissolve.plugin/Contents/PkgInfo Dissolve.plugin/Contents/Resources/Dissolve.rsrc The first item is the actual plug-in, the binary executable. The second item is the package info created by Xcode containing the creator and type information to make the package icon for Finder. The third item is the resources for the plug-in in binary form. The Dissolve example is the only example that shows a Universal binary configuration. The Dissolve example actually shows 6 different build configurations. Debug_PPC, Debug_i386, Release_PPC, Release_i386, Debug_Universal and Release_Universal. Apple Xcode debugging
To installUn-zip the archive. Be sure to keep the folder structure intact. The project settings use relative paths to locate common files for all projects.On Windows, ignore the __MACOSX folder contents. The zip file is created on a Macintosh for both platforms and there is an extra folder present after the un-zipping. The documentation included on this kit requires Acrobat Reader to view it. To download a copy of Acrobat Reader free of charge, go to http://www.adobe.com/. Apple XcodeAll the Macintosh projects in this SDK were tested using Apple Xcode environment, Version 3.1 and 10.5 platform SDK. This is the recommended version for building a plug-in for Photoshop.Microsoft Visual StudioAll the Windows projects in this SDK were tested using Microsoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200) This is the recommended version for building a plug-in for Photoshop.MemoryAlways ask Photoshop for large amounts of memory. See Memory Management for more information.C++ exceptionsIf you turn on C++ exceptions in your plug-in project make sure you wrap all of your call backs with try/catch blocks. You do not want to throw back into Photoshop. This will cause Photoshop to disappear without a warning to the user. Make sure your try/catch blocks are around your PluginMain routine and any OS proc, say for your Dialog routine.Clean UpThe SDK has gone through some clean up for this version. The C++ wrapper classes for plug-in types have been removed. Along with some of the sample projects. This is around an effort to consolidate the examples. The goal is to have one example for each plug-in type that exposes the key features of the API. There is little value added in wrapping an API in an API and it makes maintenance very difficult. The following projects have been removed: shape and selectorama examples have combined into the selectoramashape example. |