Copy link to clipboard
Copied
Hi,
I wants to export only a single layer as JPEG file in Automation plugin. I have gone through the the implementation in which every layers in the current document is exported as files. But i wants to export any particular layer. I had searched the API for this, but havent got a single may be i am very new to this.
Please guide me with what steps should i follow to achieve this.
Thanks a lot.
Copy link to clipboard
Copied
You _may_ actually be able to do what you want by using ActionScript without even going to the Automation plugin. I'd really explore this possibility first, since to do your task in C++ you'll have to write quite a substantial amount of code.
If you have to go though Automation, start with the Getter plugin from the SDK - it will provide you with the information about the layers within a document. The rest depends on how you'd like your plugin to work: if, for instance, you want a GUI with a layer selection functionality, you probably will have to write a bunch of functions that use the document descriptor to count the layers, retrieve their properties and then display them to the user with some third-party toolkit or native GUI API that will supply you back with the selected layer's ID or index. You may also simplify your task and always export the current layer, in which case you need no GUI / layer enumeration etc
I hope that provides you with enough info to start
Copy link to clipboard
Copied
Thanks for your reply.
I have started with the automation plugin, But definitely i ll go through the Getter plugin.
for now my current status is that i have got information about the layer counts, layers name, layerIndex, layers ID. but m stucked where i have to save this layers to files.
Copy link to clipboard
Copied
You could modify my standalone utility psdparse to output JPEG layers instead of PNG. Should be less than 2 hours' work.
http://telegraphics.com.au/svn/psdparse/trunk
Copy link to clipboard
Copied
@ qu1j0t3
Would you please tell me the step for achieving this. How do i gets the layer and save it a an image file.
Copy link to clipboard
Copied
See: http://telegraphics.com.au/svn/psdparse/trunk
Code for writing PNG is included. As I say, to modify to use libjpeg should be a matter of a couple of hours.