Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I am not trying to merge every layer and flatten the image. Instead I'm looking for a faster alternative to right-clicking every layer and converting to smart object, then rasterizing the layer. Or an alternative to the About.com suggestion, but applied to every later.

Turns out using the menu option Layer > Rasterize > All layers does not flatten layer effects, and that's exactly what I'm looking for.

share|improve this question
add comment

4 Answers

The only thing I can think of to save a little time would be to create a simple Action that does the Convert to Smart Object and then Rasterizes it in one press but you'd still have to go through each layer individually hitting this button.

Of course I'm not exactly sure off the top of my head what the practical use for doing this even is. What About.com says I don't think is accurate if I have let's say a Vector with an outerglow on it and then rasterize the layer so that I may apply a filter even thought the layer effect is still editable it absolutely is affected by the filter.

share|improve this answer
1  
I would probably do this, but I would add extra select forward layer step which would move to the next layer. Then you could duplicate all the steps couple times so that it flattens more than one layer per click and then you can just click play icon in the action window like crazy until it loops through all the layers. ( It doesn't matter if you repeat the action twice in some layers by accident.. ) ..and you might want to ungroup all the groups prior to using that action.. –  Joonas Mar 16 '12 at 17:30
    
I'm following this approach, but I noticed some stuff can't be converted to a rasterized layer :( –  barraponto Mar 19 '12 at 23:19
add comment

I know this is an old question, but for people just finding this question, you can automate this without saving separate files for each layer.

  1. Select all layers except the background
    Ctrl + Alt + A (Win)
    Cmd + Opt + A (Mac)
  2. Layer → Rasterize → Layer Style

This rasterizes layer styles, vector layers, smart objects, etc. It works for CC and at least as far back as CS6. I haven't tried it on any older copies.

If you record a macro with those two steps, you can use the Image Processor or other batch scripts to apply it to a whole folder of images.

share|improve this answer
add comment

It is possible to do such things (such as iterating through all layers and do arbitrary things to each) using apple actionscript, javascript, or vbscript. I have only dabbled in this so I can't really go much further than saying that it is possible to do this. Search the adobe site for information about scripting. There is way too much information than is possible to delve into here.

Of course, if it is recordable, and you don't mind interacting with the process, you can just select a layer and click an action.

This script is something I came up with in response to a sprite sheet question. It does not have anything to do with the question, except to illustrate creating and manipulating layers in Photoshop using scripts.

share|improve this answer
add comment

Given your real intention is to export all layers, I think there is other, better options.

All I need is a software that runs on my OS and lets me crop and cut the layers for Web usage.

Photoshop’s Export Layers to Files script is a great way to do this.

  • Choosing File → Scripts → Export Layers to Files, each layer of your document will be saved as a separate file with a filename that matches the layer name. You don't have to prepare your document by creating Smart Objects or rasterizing layers.

  • Specify a folder to save all the output files.

  • Choose an export format that supports transparency (e.g., PNG 24) and be sure to check "Transparency" in the dialog.

  • Optionally select "Trim Layers" in the script dialog, to remove excess transparent image area.

By using Export Layers to Files, you can leave your Smart Objects and other layers intact.

Much quicker and easier.

share|improve this answer
    
Right. Though, it is quite important to remember to turn elements that belong together into single smartobjects so that they wont get extracted as separate images. ( For example if you have a button that has extra stuff like highlight and icon... those will get extracted as separate images if they are not in a single smartobject ) I'm not a big fan of extracting all layers when it comes to webdesign. –  Joonas Mar 18 '12 at 20:48
    
Lollero: I rarely use this technique. For most exporting for web, iOS and Mac app design, I use sprite sheets with slices. A bit of a pain to set up, but very flexible and fast. Although, in specific situations, exporting to layers can be great. –  Marc Edwards Mar 19 '12 at 3:16
    
@MarcEdwards that helps, but is not what I'm looking for. Once exported into files, I can no longer reassamble them in a single document, and I lose their relative positioning. :/ Just noticed Lollero already mentioned that — and merging before I export is what I'm doing right now. I'd rather rasterize in PS, then merge, cut and crop in GIMP. –  barraponto Mar 19 '12 at 23:16
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.