Skip to main content
sebd75331243
Known Participant
June 8, 2017
Question

Export layers to files script but with 'trim' option ?

  • June 8, 2017
  • 3 replies
  • 1565 views

Hi guys,

I' guess I'm not the only one who got stuck with this one....So far I was not able to use the Adobe script so it can add the 'trim option' like it was previously possible in older photoshop version, I'm not quite sure which one but I remember the 'trim' option was available.. this was awsome.

Right now what I understand is that the new way to export layers to file cannot add the trim option becuz the script was not design that way.

So is there any of you who know the way around this problem ?

I don't mean like 'exports layers to file' and then start a batch process to trim the images afterward, cuz this is my solution right now, I mean a single script that does the work all at once ?!

Thank for your help guys.

This topic has been closed for replies.

3 replies

Jeff Arola
Community Expert
Community Expert
September 17, 2020

Yes if you use PNG-24 as suggested by GI87, then there is a Trim Layers option.

 

 

 

Another option is to select the layers in the layers panel. right click and Export As, which should Trim the layers.

 

Chuck Uebele
Community Expert
Community Expert
June 8, 2017

Offhand, I don't know of any. I tend to make my own custom scripts rather than relying of other scripts. It's good to look at other scripts for how things are done. If you're new to scripting, start with doing simple things, then build on that. Using Scriptlistener is a good way to get code for many things. It's like recording an action that you can then modify and piece together other blocks of code.

Chuck Uebele
Community Expert
Community Expert
June 8, 2017

I suppose you could create you own export script, perhaps cycling through the layers, turning the on the visibility for just that one layer, duplication the file with merge visible, then add the trim command in. Most all could be done using scriptlistener to get your general code.

sebd75331243
Known Participant
June 8, 2017

Thanks Chuck for reply,

I don't know how to script this...

Do you know if there some script out there that can do that ?