What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Saving layers as seperate png's with persistent top/bottom layer


bignadad

New Member
Messages
4
Likes
0
I have been doing so much research trying to figure this out. Either im missing something or its not possible.

29571-saving-layers-seperate-files-one-persistent-layer
(sorry i cant post links)

I ran across that post on this forum and that is exactly what i want to do (at end of post)

Ive tried the LayerSaver jsx but it only allows selected layers and top layer and bottom background.

my bottom has to be transparent.

I have an icon set that has a bottom group (that i can merge to layer) and a top group (that i can also merge to layer) and the middle contains my icons.

Is this possible?
 
I just figured out i could put my icons in groups and choose the option "save all layersets along with top and bottom layersets"

Only problem with that is i would have to put all my icons in groups. there are about 1,000
 
Ive been looking everywhere to put all my layers into layer group and rename group the layer name. I cant find anything anywhere. If i could do that i would be able to run the "save all layersets along with top and bottom layersets" option from layer saver.

I just cant seem to figure this out. Am I asking for the impossible?
 
No, it's possible, if you mean what I think, you just want to name the group, name it like any layer: dbl click the name "group" and name it in the box. If that's what you want to do . . .
 
Solution to "Saving layers as seperate png's with persistent top/bottom layer"

Like other tasks in Photoshop, this could be achieved in multiple ways. Here is what I would do, using the PS Variables + OSX Services + PS Actions.

This may be an extensive tutorial: you may want to print it out for convenience. Although it may look intimidating, you don’t need to learn any languages/scripting, etc. Thus, it is a relatively simple (!) method, I think ^_^
PS tutorial guide 20130701.jpg
First, If you have separate files (not layers) for each icons, you can skip the step 1-2, and begin from step 3.
  1. In the Photoshop file, make all icon layers visible (Your description gives me the impression that each icon is on a separate layer: I hope so.) Make all the other layers invisible.
  2. File > Scripts > Export Layers to Files. In the dialog box, select your destination folder, File name prefix such as ICON, Check Visible Layer Only option, File Type: PNG-8 with Transparency and Trim Layers checked > RUN (Wait till all layers are converted into individual PNG files in your selected folder: open the folder and confirm the conversion)
  3. This crucial step (to get multiple finder item’s paths) is only for Macintosh users: Sorry, I don’t know how to do this in Windows in a simple manner. (See my Fig. 1, which came from http://reviews.cnet.com/8301-13727_7-57578129-263/how-to-copy-a-file-path-in-os-x/)
    A) open Automator (Appliations/Automator).
    B) Select “SERVICE” in the template dialog box > Choose.
    C) Service receives selected (select FILES OR FOLDERS here) in (select FINDER here)
    D) In the left Library panel, select UTILITIES, and on the next column, drag COPY TO CLIPBOARD onto the main Workflow window, right below the “Service receives selected” row
    E) File > Save Service As > “COPY PATH TO CLIPBOARD” without quotations
    F) Quit Automator
  4. Now that you have established the Copy to Clipboard Service, you can SELECT all the icon files (eg. all PNG files for each icons) in the Finder window. With all icon image files selected, right/control click to open the context menu > COPY PATH TO CLIPBOARD
  5. Open TextEdit (Applicatioins/TextEdit) > Format: Make Plain Text > type “icons” without quotations (careful with lowercase) > hit Return to the next line > Edit : Paste (paths to all icon files) > Save As “Icon Variables.txt” into the folder with all icon image files (See Fig.2)
  6. Now, Open your Photoshop file with Top, icon, and Bottom layers/groups. > Leave only Top and Bottom groups and delete the entire icon layers/group. Save As a differently named PSD file.
  7. Create a new layer between the Top and Bottom layers. > choose the Rectangle Tool (U) with black Fill, and No Stroke: Create a solid rectangle with the size that will define the position and dimension of the icon (see Fig.3)
  8. Name the newly created rectangle layer "icon position”
  9. From here is the essence of this tutorial: Menu bar > Image > Variables > Define
    In the Layer: Select “icon position” > check Pixel Replacement: Name “icons” Notice the name given in the Name variable box must be identical to the 1[SUP]st[/SUP] line of the text file created in step 5 > Method (select the dimension options here), you may/not want to check Clip to Bounding Box > OK
  10. File > Export > Data Sets as Files > Select Folder: your preferred output folder > Data Set: All Data Sets > File Naming: if you choose Document Name + Space + Data Set Number (01, 02…), all the files will have the names like “original PSD file name 01, 02, …” > Check Compatibility > OK
  11. Wait until the entire PSD files are created, with the TOP layer/group – a single icon image - Bottom layer/group in your output folder (see Fig. 4-6)
  12. Once the PSD files are all created, you can Batch Convert them to PNG files (I will just briefly describe here: With any PSD file open, Window > Action > Create your own Action: begin Recording > File > Save As > PNG > Save > STOP recording > Save the Action with a proper name like “Convert to PNG”
    File > Automate > Batch : find and run your own Action > select Source (with PSD files to be converted) and Destination Folders (PNG files to be saved) > OK
Good Luck
Rev
 

Back
Top