0
Looking 4 Script: Export Layers to Files + Crop Layers
New Here
,
/t5/photoshop-ecosystem-discussions/looking-4-script-export-layers-to-files-crop-layers/td-p/1095912
Jan 11, 2009
Jan 11, 2009
Copy link to clipboard
Copied
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.
Thanks.
TOPICS
Actions and scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
Community Expert
,
/t5/photoshop-ecosystem-discussions/looking-4-script-export-layers-to-files-crop-layers/m-p/1095913#M447574
Jan 15, 2009
Jan 15, 2009
Copy link to clipboard
Copied
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);
var myDocument = app.activeDocument;
myDocument.trim(TrimType.TOPLEFT, true, true, true, true);
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
/t5/photoshop-ecosystem-discussions/looking-4-script-export-layers-to-files-crop-layers/m-p/1095914#M447575
Jan 15, 2009
Jan 15, 2009
Copy link to clipboard
Copied
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.
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Adobe Employee
,
LATEST
/t5/photoshop-ecosystem-discussions/looking-4-script-export-layers-to-files-crop-layers/m-p/1095915#M447576
Mar 01, 2009
Mar 01, 2009
Copy link to clipboard
Copied
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

