Programmatically Replace Image in Art Layer

847 views2 repliesLast post: 8/22/2009
Hi All,

I'm a professional software developer, but new to Photoshop and ExtendScript.

In a nutshell:

* I have a PSD file that contains several Layers (in ExtendScript they each is called an ArtLayer).
* Each ArtLayer contains one image.
* I would like to write an ExtendScript that opens the PSD file, accesses each ArtLayer, find the bounds of the image contained in the layer, and then replace the image with a new one of equal size/ dimensions.
* So far, I am abke to open the PSD and get all the ArtLayers, but I don't know how to access the image data contained in the ArtLayer or how to "set" a new image.

Any help appreciated. Thanks.

jpuopolo
#1
On 8/20/09 2:48 PM, in article
,
"jpuopolo" wrote:

Hi All,

I'm a professional software developer, but new to Photoshop and ExtendScript.

In a nutshell:

* I have a PSD file that contains several Layers (in ExtendScript they each is called an ArtLayer).
* Each ArtLayer contains one image.
* I would like to write an ExtendScript that opens the PSD file, accesses each ArtLayer, find the bounds of the image contained in the layer, and then replace the image with a new one of equal size/ dimensions.
* So far, I am abke to open the PSD and get all the ArtLayers, but I don't know how to access the image data contained in the ArtLayer or how to "set" a new image.

Any help appreciated. Thanks.

How about BATCH using File-Scripts-Output Layers to Files

Then use File-Automate-Fit Image to adjust each one to the same size (again, in Batch).

Then load them as stacks, layers, save.

It will be faster than cutting code.
#2
Hi All,

I'm a professional software developer, but new to Photoshop and ExtendScript.

In a nutshell:

* I have a PSD file that contains several Layers (in ExtendScript they each is called an ArtLayer).
* Each ArtLayer contains one image.
* I would like to write an ExtendScript that opens the PSD file, accesses each ArtLayer, find the bounds of the image contained in the layer, and then replace the image with a new one of equal size/ dimensions.
* So far, I am abke to open the PSD and get all the ArtLayers, but I don't know how to access the image data contained in the ArtLayer or how to "set" a new image.

Any help appreciated. Thanks.

jpuopolo

You could try these forums too:

http://forums.adobe.com/community/design_development

I can't help you, but thanks for the ArtLayer info.
Good luck.

fred
#3