Save layer to file and trim

混江龙づ霸主 提交于 2019-12-05 03:56:40

问题


I'm trying to export layers as files, but the script in photoshop exports layers as pngs including all of the empty space. Is there another script that allows for trimming layers before exporting?


回答1:


Select "Trim Layers" before exporting your files. By default, Photoshop supports trimming when exporting to PNG format using the script.

Optionally, if you want to export to JPEG, you can look into the script below.

Export Layers to Files with trim jpeg support




回答2:


Use Photoshop Generator.

  1. Add ".png" to layer name. (For more than one layer use Layers Rename script https://dl.dropboxusercontent.com/u/25518255/Layers%20Renamer.jsx)
  2. Check that Generator Enabled. (Edit -> Preferences -> Plug-ins)
  3. File -> Generate -> Image Assets
  4. Save



回答3:


I tried to use the following script in CC 2015 and for JPGs it works, but not for PNGs. For PNGs, the whole transparent artboard is part of the file, regardless of transparency settings. but is trimmed off for JPEG.

Obviously the 'trim' function DOES work in some cases, but the script may need some tweaking for Photoshop CC 2015.

Props to Naoki Hada, Tom Ruark, and Jeffrey Tranberry for the script. Link to the thread here: https://forums.adobe.com/thread/1639513

ALSO - another way to do I just learned is as the first commenter mentioned - using the Generator prefixes and suffixes on your groups.

Here's a good primer: http://www.maderalabs.com/?p=1249



来源:https://stackoverflow.com/questions/21552200/save-layer-to-file-and-trim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!