Solved

Photoshop CS5:  Export Layers to PNG

Posted on 2010-11-29
8
1,946 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:
cbowman92 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
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…
The goal of the tutorial is to teach the user what exposure is and how to use the exposure slider. Analyze the photo that you want to edit, then adjust the exposure slider to your liking.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now