8

What is the fastest way by which I can save a group of layers as a single .png file with empty spaces around the group of layers trimmed. I know I can run a script to export every single layer to a .png file, but can I set it to extract only selected layers and save them in one .png file?

1
  • The difficulty of all the answers relative to just using Fireworks in the first place makes it really obviouls what a mistake Adobe has made discontinuing FW. Commented May 8, 2013 at 3:00

9 Answers 9

16
  • Select the particular layers you want to save as a .png file
  • press Ctrl+e (that'll merge them into a single layer)
  • select all and copy
  • press Ctrl+n to create new file.

The default option in Photoshop is that the size of the new file will be the same as what you've in clip-board. In this case, it'll give you a size with the empty spaces trimmed.

Now paste your clip-board content and save as .png.

3
  • merging into a single layer and slicing it is as good as dragging them all into a new blank psd file. i'm not able to get the default size of the new blank file to the size of the layers in the clipboard though. is there a setting i need to do? i'm using CS5 on a mac.
    – Shyam Bhat
    Commented Jan 12, 2012 at 9:32
  • It's about speed @Shyam. Slicing is a manual process and is slow and there are chances of error in identifying transparent pixels. The process I'm talking about is as simple as "ctrl+a", "ctrl+c", "ctrl+n", "enter", "ctrl+v", "ctrl+alt+shift+s". Here, photoshop identifies all transparent pixels automatically and gives you the perfect bounding box size automatically. Commented Jan 12, 2012 at 15:21
  • I'm not a mac user but for windows, make sure that the preset option in the "create new file" dialogue box is set to custom to get the clipboard size. Refer point no 5 in the link Commented Jan 12, 2012 at 15:24
2

Found this script called Layer Saver when searching for a solution to this same problem.

This script will allow you to save layers/layersets to different formats PNG, PSD, PDF, TIF, JPG or JPG Save For Web. A different menu is given depending if only layers or layersets found.

enter image description here

Works like a charm and offers many different formats!

2
  • Can you please explain in a few words what the script is doing? Your answer forces one to leave this site...
    – Mensch
    Commented May 7, 2013 at 23:51
  • Hi Mary! I added a short quote and image from that site so it's easier to see what the script does. Feel free to re-edit or add more info if you think it's important. Welcome to GD.SE!
    – Yisela
    Commented May 7, 2013 at 23:57
2

Try turning off the layers you don't want and saving as a .png file with save for web. That way you have a little control on the final resolution output. Or are you looking for a batch type of saving method?

2
  • 1
    not the best thing to do when there are like a hundred layers and many more sublayers inside. yes, a script!! is there a script for the love of god?!
    – Shyam Bhat
    Commented Jan 12, 2012 at 9:50
  • Yes, a script would be great for this, but in playing devils advocate, how would the script know which layers to ignore? just curios are they the same layers in all images? If so possibly photoshop comps would be a way to go.
    – Danferth
    Commented Jan 12, 2012 at 16:39
1

Another method to do this is to create "Layer Comps" and from scripts export each Layer Comp as a file.

I'm sorry, I'm new here, so I do not know how to put in advanced formatting and images, so my answer may seem pretty empty.

1
  • Until you've gained some points from participating in the community, you won't be able to post images. If you can provide to a link to the image? Maybe someone can edit it into your answer as well :)
    – kontur
    Commented Jul 26, 2015 at 11:49
0

You can record an action such as:

  • first select the layers you DON'T want to see/export.
  • choose "group from layers..." in the layers palette menu name it something like FOOTEMPLAYERSGROUPBLARGLE
  • hide the group
  • {...}
  • export
  • close, NO SAVE (the grouping will re-arrange those selected layers in first step)
  • OR instead of close, no save, REVERT
  • {profit}

EDIT:

AND after you record it, then you merely crop to the area you want, select the layers you don't want, and then run the action.

0

Make only the layers you want to use visible, then go to File > Save for Web & Devices. Once there select .png from the dropdown menu. You will now have the ability to tweak many of the settings (color depth, quality, etc.) including transparency. This keeps your original file as is and creates a new file with your desired settings. Good luck.

0

My solution is :

  • Select the required layers & disable all other layers
  • select trim from image>trim
  • Save this as a .png file using File > Save as
  • undo Trim action using Ctrl+Alt+Z
  • Repeat for other layers.
0

Ok this is cool. Group your layers into a single group then right click the group in the layers palette and choose 'export as'. You get to choose scale, format and quality. The resulting image will be named the same as the name of your group.

Now the really cool bit. If you have lots of layers in lots of groups - shift (or control) select the groups you wish to export and then do the same as above (by right clicking on any of your selected groups). They will all be exported at once and will be named the same as your groups.

This all works with single layers or grouped layers too. Just select whatever you want in the layers palette.

Export as dialogue box

1
  • Does this export every layer as a separate file? Because that's not what the question asks for. Welcome to GD.SE!
    – Luciano
    Commented Jul 14, 2016 at 13:41
0

Simply select the group, and go to Layers > Quick Export as PNG (Shift + CMD/CTRL + ') that will automatically merge the group's content and export it as PNG. Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.