Solved

Photoshop CS5:  Export Layers to PNG

Posted on 2010-11-29
8
1,951 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
  • 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Browser Based remote access software 8 58
black magic design 1 128
Simple Text Web Page rendering differently on IE versus Chrome 3 95
Mac neophyte...printer issue... 13 104
Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Read about why website design really matters in today's demanding market.
The goal of the tutorial is to teach the user the full work flow of how to use flash media encoder to stream onto YouTube.
Learn how to automatically add page numbers in your next InDesign project. This can be very helpful in multi-page books and magazines that you are designing. Make sure your Pages window visible.:  In the document you wish to add page numbers to. Act…

770 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