Programmatically Replace Image in Art Layer

J
Posted By
jpuopolo
Aug 20, 2009
Views
847
Replies
2
Status
Closed
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

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

JS
John Stafford
Aug 20, 2009
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.
F
Fred
Aug 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

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

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections