Solved

Photoshop CS5:  Export Layers to PNG

Posted on 2010-11-29
8
1,959 Views
Last Modified: 2012-05-10
Hi All,


I've been given a PSD file with 300 icons, each is there own layer.

Is there an easy way to trim and export all layers to PNG?
0
Comment
Question by:detox1978
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 12

Accepted Solution

by:
Craig Bowman earned 350 total points
ID: 34233013
I know this worked in CS3, but have you tried  File > Scripts > Export Layers To Files?
0
 
LVL 2

Author Comment

by:detox1978
ID: 34233059
looks promising, I'll give it a try and let you know how i get on.
0
 
LVL 2

Author Comment

by:detox1978
ID: 34234664
Ok that works, but takes far too long - around 2 hours per PNG as it cycles through every image one at a time just to create one PNG.  As there's 300 PNG's to create it would take weeks.

Is there a method that efficiently?  

I.e just exports each layer, without cycling through every layer first.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Assisted Solution

by:David Brugge
David Brugge earned 150 total points
ID: 34234783
300 layers is really not that many to have to deal with.

Short of writing a custom script, (which shouldn't be to hard since you already have the basic write Layers to Files script as a source, my suggestion is a method of divide and conquer.

If a file with 300 layers takes 2 hours, then a file with 150 layers should take only a hour, etc.

Open the file and drag, oh say, 25 layers into it's own file. Then run Layers to Files script. If the time is reasonable, proceed with the next 25. If it is still taking too long, make the number something like 10 layers.

If this is still more time than you want to spend, hire some kid to do it for you one layer at a time.

The solution is not elegant I admit, but sometimes you need to just do what you need to do in order to get on down the road.
0
 
LVL 2

Author Comment

by:detox1978
ID: 34234862
Divide and conquer is probably going to be the quickest solution.

I found this script on the internet;
http://www.pretentiousname.com/ps_exportlayersfast/index.html

Where he hides each layer one at a time (the PhotoShop built-in script duplicates them), is there a way this script could be edited so it hides all layers and just displays the one I want?

Alternatively does photoshop have a macro recorder similar to MS Office?
0
 
LVL 26

Expert Comment

by:David Brugge
ID: 34235094
>is there a way this script could be edited so it hides all layers and just displays the one I want?

Yes, but I'm not the goto guy for coding advice. I'm still in the fumbling around stage with javascript.

>Alternatively does photoshop have a macro recorder similar to MS Office?

Yes, Photoshop has a macro recorder, the Action Script, but it can only record actions that do not require logic. For instance, you can record a script that hides a layer, but when you run the script, it will keep trying to hide the same layer. You can't instruct it to hide the next layer each time you run it, for instance.

On the other hand, if you just want to use brute force to do this, you can record an action that sames the current image as a png to a specific location and assign it to a hot key. Then it is just a matter of hiding a layer and hitting a hot key.

The slowdown with this method is that you have to pause to name each file as you save it. There isn't an automatic naming protocal that will let you keep saving files to the same location.
0
 
LVL 26

Expert Comment

by:David Brugge
ID: 34235167
As far as the automatic naming when using an action. I have had to use this brute force method a number of times.

I save the name of the file to the clipboard, then paste the file name in along with the first two digits of a three digit number and simply add the final digit. After ten saves, I backspace one digit, enter a new one, save it to the clipboard and proceed.

The workflow is then...(where F1 is the hot key that I assigned to my action)

Hide layer >> F1 >> Ctrl+S >> + digit >> [Enter]

repeat
0
 
LVL 26

Expert Comment

by:David Brugge
ID: 34235187
Opps! delete the Ctrl+S. That part is included in the action, I meant Ctrl+V to paste the file name.

It should read...

Hide layer >> F1 >> Ctrl+V >> + digit >> [Enter]
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PaperPort 14.5 Patch 1 update is often not detected or downloaded automatically. This article provides direct download links to solve the problem for retail (non-bundled) versions of the Standard and Professional editions, as well as the Professiona…
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question