Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a lot of designers send me layered PSDs of their designs and I need to break out the pieces of the designs to place on web pages. I can do a decent number of things in Photoshop, but I'm hardly efficient with it.

My old way of just copying the image that's in a layer and pasting into a new image seems to take forever as I screw around with cropping and such.

I've got Photoshop CS5, so I don't need external software to do anything, but I just need to figure out how to take a single layer, that may hold something small like an icon, and export it as a PNG or JPG.

I am aware of the script called "Export Layers to Files" but it took about an hour and exported ALL of my layers to a huge number of files. I wasn't looking for a solution that broad.

Is there an easy way to do this?

share|improve this question
add comment

7 Answers

up vote 15 down vote accepted

To export a single layer or a group of layers in Photoshop you must have only those relevant layer(s) that you want to export visible. (So hide all the layers that you don't want to export and keep the relevant one's visible.) Then go to File - Save for web and save your image.

To understand this process in depth please have a look at this tutorial.

share|improve this answer
3  
it won't autocrop the layers, though. –  barraponto May 28 '12 at 16:18
2  
Yes, so if your original image is larger than the layers you have to go back to all the exported images and crop them. To get around this use Smart Objects, see my answer below. –  reflexiv Jan 29 '13 at 17:29
add comment

Select the layer you want to export to a new file.

In the top menu, Click "Layer" --> "Duplicate Layer..."

Note that there are TWO options. One is for the name of the new layer...

The second is for the destination of the new layer, either your current document or a New document. Select "New."

share|improve this answer
    
this answer is so much better –  David T. Feb 24 '13 at 3:26
    
Very helpful tip! –  J.Romero Apr 6 '13 at 21:33
3  
When you select "New" is it possible to obtain a document of the same size than the duplicated layer? –  djromero May 29 '13 at 10:11
    
Very helpful tip. Wish this cropped it though. Either way it's a nice feature to know. –  Trey Copeland Jun 4 '13 at 18:40
    
Trey, see my answer below for using Smart Objects that auto-crops most of the time. –  reflexiv Sep 17 '13 at 1:39
add comment

The previous answers won't autocrop to the layer size as barraponto points out. Smart Objects fixes this and is more efficient:

  1. Right click the layer in the Layers Panel and select Convert to Smart Object
  2. Right click the layer again and select Edit contents

CTRL+click multiple layers before converting to a Smart Object to group them.

share|improve this answer
    
This is by far the easiest and most efficient answer for exporting a single image/layer from a document that is handed to you. –  John Jul 10 '13 at 18:04
    
That should be voted as the answer. Because it definitely is. Thanks @reflexiv. –  Eric MORAND Sep 3 '13 at 13:59
add comment

You can do this by going to File -> Scripts -> Export layers to Files

share|improve this answer
    
except question says he's aware of this and it's a bad solution for his case... plus it doesn't really always work. –  Cawas Nov 28 '13 at 13:39
add comment

I would add to @Daniel Garman's answer.

  1. Duplicate Layer (either in menu on right click on the layer) --> NEW (also gives the option to give it a name at that time so you don't lose what the layer was called before you get to the save step)
  2. Image --> Trim (which will give you options of removing transparent pixels)
  3. File --> Save for web (CMD-SHIFT-OPT-S on OSX)

That's a pretty quick way to do it.

share|improve this answer
    
I think this is the best answer by far –  Kabamaru Feb 25 at 19:32
add comment

The traditional way to export only part of a layer is to use Slices:

  1. Hide any overlapping layers that contain pixels you don't want to export (if they don't overlap the area you're interested in, you can leave them showing).

  2. Create a slice for the section you're interested in, using either the Layers menu: "New Layer Based Slice" (which is fairly automatic) or else manually create it with the Slice tool. Make sure your new slice is the only one that's selected (there's a slice select tool right next to the one that creates slices, in the same flyout menu).

  3. In the Save for Web dialog, make sure the slice is still selected.(That dialog has its own slice select tool if you need it.)

  4. During the save process, there's a popdown menu; make sure you've chosen Selected Slices so it doesn't save everything.

Most people don't use slices any more, since they were designed for the earlier days of the Web when individual images were often sliced up and then reassembled in HTML -- rarely done now. But I still find them useful for this purpose.

Unfortunately, the interface for slices hasn't been updated and they can be a little awkward to use, but see whether they help in your situation.

share|improve this answer
add comment

the old fashioned traditional way of doing this - say pre-CS would work as well, in this case:

  1. reduce any layered artwork to a single layer - you can undo this later
  2. option/alt click that layer in the LAYER pallette - this will give you a selection of just that layers artwork and not the surrounding canvas
  3. copy --- edit>copy or option/alt C ==== you now have a copy of this layer on the clipboard
  4. make a new document -- when you do you will notice that the new document will now be the size of what you copied onto the clipboard
  5. your new document will contain just a plain background .... just hit "paste" --> edit>paste or optioin/alt V
  6. at this point you have 2 separate documents -- you can go back to the ORIGINAL document and undo any layer flattening back to its original condition
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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