Thursday, April 1, 2010

Is this possible? Looking for SDK...

Hi All,



I'm looking for any input regarding the Photoshop SDK and/or scripting possibilities for an issue I have. We have several thousand PSDs that need to be processed as follows and we're hoping we can automate the task.



Each PSD contains 2 layers, named 'A' and 'B', and a guide. We need to:

1. Resize the image (each image will share the same dimensions).

2. Export layer A as a PNG

3. Export layer B as a PNG

4. Get the pixel coordinates of each of the guide corners. Basically, we need the margins that contain the area within the guide.



Ideally, I think the best solution would be a command-line driven program that takes a PSD file name and width %26amp; height values as arguments, processes the file and returns the coordinate values.



I have looked thru the scripting docs and don't think it'll do what I want, and I don't yet have access to the SDK docs so I don't know what's possible there.



Does any of that sound doable and/or does anybody have any ideas? Any help appreciated.
Is this possible? Looking for SDK...
Scripting would work for all but #4. I don't think you can get the info about the guides from the scripting or automation interface. If you are on windows you can use VBScript to drive Photoshop and not even have it display. You can do the same on mac with AppleScript but Photoshop would be visible to the user as it processes the images. You could use the SDK and write an automation plug-in but the scriptinging interface has what you need and would be an easier language to use. IMHO.
Is this possible? Looking for SDK...
I have written a program which exports layers as PNGs, and can also generate text/XML summaries of PSD contents. It should be easily adaptable to this task:
psdparse (
source in Subversion). It's portable to any UNIX or even Windows.

opps, Sorry...

No comments:

Post a Comment