?
Solved

Saving the layer name as the filename in save for web.. ?

Posted on 2006-04-11
11
Medium Priority
?
631 Views
Last Modified: 2010-04-03
Hello,

I often have to resize many image files, and duplicating the layer into a psd file, then saving each individual layer as a web graphic.  When I select each layer to save from the save for web menu, it inputs the psd filename as default, which means I have to manually enter the name again for each layer.

Is there any way I can have photoshop (cs2) have the layer name for the save as (for web) box.

For example, i have many layers all in one file, called photoshop.psd  and each layer is named layer1 layer 2 layer 3 etc.

When I click save for web, it will have "photoshop"(.gif/.jpg) input automatically, so i have to edit that and change it to layer1.gif etc.. for each layer.  Is there any way to have photoshop have layer1.gif automatically if it is the selected layer, instead of the default photoshop.psd file name??

This is quite urgent..  any responses are appreciated!!
0
Comment
Question by:thyros
11 Comments
 
LVL 26

Expert Comment

by:David Brugge
ID: 16431101
Take a look at File/Scripts/Export Layers To Files and see if this will do what you need
0
 

Expert Comment

by:ccsantos
ID: 16431184
Before you save, flatten the images.  Then when you try to save, since you have flattened images its not a psd anymore, you should now be able to save in gif or jpeg.
0
 

Expert Comment

by:tatteredtomes
ID: 16439526
There is no really easy way to accomplish this. I wrote an Action in that I renamed the Layer to Layer 1 and then saved for Web typed in the name "Layer 1" It seems to work but you may need to tweak it.
Also you can just click on the layer you want, save for web, rename your file. You can record an action that saves to web and uses the name you want. That way you would not need to retype the name each time. Hope this helps.

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 26

Expert Comment

by:David Brugge
ID: 16442095
***clarification***
On the method that I described above (scripts/export layers to files) it does not use your layer name as the file name. Instead, the script asks you to enter a prefix name, and then it will number the files sequentially with the prefix as part of the name. I still think that it will do what you want.
0
 

Author Comment

by:thyros
ID: 16447778
This isn't quite working for me.

Maybe if I rephrase it will help spark an idea.

Is there an easy way to select several layers in a file and 'save for web' ?  preferably, when it does that, it offers to save the optimized gif as the layer name.  Can that be done?

Right now, I am having to select each layer, then select save for web, then save, then repeat over for each layer.  Can't I select multiple layers and save them one after another without having to leave the save for web dialogue box?

It may not even be possible in this software!?!
0
 
LVL 26

Expert Comment

by:David Brugge
ID: 16450998
Well, with a little knowledge of scripting (java or Visual Basic) you can write a script to do just that, but I'm not much of a coder so I can't help in that regard. If all else fails, you might go to one of the coding sections of EE and see if anyone has PhotoShop scripting experience.

It would be easy to take the existing “write Layers to Files” script and read the file name from the program, but I don’t have any idea what the call function for the layer name is.

I'm sure you would much rather find a simple solution. I hope there’s one out there to be found.
0
 

Author Comment

by:thyros
ID: 16486466
Thank you all for your comments, I appreciate it.

I have found another method to simplfy my task.  It is not really a solution to this question, but it gets the job done for me.

Basically, some of my work involves taking images from the web, saving them, then resizing to 3 different sizes, and to top it all of, I need to have a final consistent image size..  i.e. after making thumbnails I then have to resize the canvas so that all images fit inside a fixed dimension.  So this meant saving an image, opening it in photoshop, duplicating it, resizing it, then duplicating the layer into a another psd file which had the correct canvas size/dimensions.  Then I was saving each layer, and having to name it appropriately.   All this is pretty much already, but imagine having to do it for 300+ items, each one resized and renamed several times!  you do the math.

Anyway, I found it easier to just save the files with a normal name that describes the image, then do a batch resize and rename using irfanview.  For the rename purposes, I append a prefix like  thumb_originalfilename.gif etc.  After doing that, I just open the whole bunch of images in photoshop, and setup a macro using a program like shortkeys, one for doing the canvas resizing, and one for the shortcut of 'save for web'.  So then it is just a matter of hitting 3 or 4 buttons and my images are all saved with the correct canvas size.  man, what a Godsend!  

0
 
LVL 6

Expert Comment

by:Wooky Jack
ID: 16644886
That's great you found something!  Were any of these comments helpful?  Otherwise you can post a zero point question in Community Support to let a site mod decide whether this should be stored in the database ;)
0
 
LVL 26

Accepted Solution

by:
David Brugge earned 2000 total points
ID: 16645065
thyros

Everyday, I have to prepare images for an online catalogue. The originals are various size files, but being print files, they are usually in the size of 9M to 12M each.  I have to make a thumbnail, a regular view and an enlarged view. Each save size has to be a particular dimension because the images load of the page dynamically.

My work flow is to gather a copy of all of the images in a folder and, opening them one at at time, use the crop tool to downsize to the largest web size (the enlarged view) and saving the file using the stock number for the image name. This folder I call lg for large size. When I get through I will use Photoshop to append "_lg" to each name.

Next I make a copy of this folder and run a batch that resized the large images into medium size files, applies sharpening and saves.

I then make a copy of THIS folder and run a batch that resizes to thumbnails and again applies sharpening. The files in this folder are renamed with "_tm" at the end of the name.

I rename the first folder to add the "_lg" and then drag them all to one folder and upload. The upload will have a 000001.jpg which is the middle size image, a 000001_lg.jpg which is the large image and a 000001_tm which is the thumb.

A data base of descriptions, prices,  and attributes is uploaded which has the image names (although they could just as easily be created dynamically using the stock number.

The whole process takes me about an hour and a half to do 300 images, most of that spent opening and cropping the originals and confirming the stock numbers match the images. The key is using the crop tool and writing actions to resize and sharpen that I can then batch.

If I had your job to do, I would add one step of opening a file, cutting a layer and repasting it to a new file. Because I do all of this with keyboard commands, it would take me just a few seconds per layer.

Best of luck
0
 

Author Comment

by:thyros
ID: 16678833
Hello,

Just an update.  Thank you all for your comments, they are very much appreciated.

Since posting this topic, I have not had to process such a large number of images anymore (Thank God!), and the method I described in an earlier post worked for me.

However, going by the question, the comments from D_Brugge are most helpful, in that there is a solution, even if I didn't use it, it is still possible, and therefore deserving of the points.  

Thank for your time.  Take care.
0
 
LVL 26

Expert Comment

by:David Brugge
ID: 16679061
thanks thyros! Hope to be of more help next time.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this article, I'll explain how to change the color of a selection in Photoshop. I'm sure there are a couple different ways to do this in photoshop, but this is my preferred method in Photoshop. I am using Photoshop CS6 and I will be adjusting the…
Read about why website design really matters in today's demanding market.
In this tutorial viewers will learn how to restore old photos in Photoshop (an introduction to the Clone tool) Zoom into a damaged area: Click on the "Stamp" icon to use the Clone tool. Hold the Alt key and click to select a region. Click again, and…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Suggested Courses

840 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