Skip to main content
Participant
January 12, 2009
Question

Looking 4 Script: Export Layers to Files + Crop Layers

  • January 12, 2009
  • 3 replies
  • 1378 views
I am aware that Photoshop has the Export Layers to Files script, however, the script does not crop the actual layers to their size... is there a script/action that adds the extra function of Cropping the layers when they are exported as files?

Thanks.
This topic has been closed for replies.

3 replies

Legend
March 1, 2009
If you look in the "Export Layers to Files..." script that ships with CS4 there's an example for doing this at around line 1000.
Paul Riggott
Inspiring
January 15, 2009
You might be better with:-
app.activeDocument.trim(TrimType.TRANSPARENT);
As if you use app.activeDocument.trim(TrimType.TOPLEFT, true, true, true, true);

It could be removing something that is wanted.
c.pfaffenbichler
Community Expert
Community Expert
January 15, 2009
Im not sure about where exactly to integrate that in the »Export Layers To Files«-Script, but trimming an image is not so hard via Script:
var myDocument = app.activeDocument;
myDocument.trim(TrimType.TOPLEFT, true, true, true, true);