Link to home
Start Free TrialLog in
Avatar of prashantdubey55
prashantdubey55

asked on

Photoshop Actions

Hi
I need to develop an action in Photoshop CS, which can be applied in Batch & does following tasks on a specified folder :

Open the image
Apply compression (any compression like GIF or LowJPG, ...)
Save the optimized file at same location
and close the file.

But, it should not ask me to overwrite file if same file exists in the folder. It must automatically handle the conflict.

I tried making an action for the above problem.

B ut when I run in Batch, it opens files from specified location but while saving, it refers the path coded in action! Purpose is to apply a compression to one of my web folder with images, so that the images are reduced in size and website performs optimally.

Please help me out !!

Thank you
Prashant
ASKER CERTIFIED SOLUTION
Avatar of David Brugge
David Brugge
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of prashantdubey55
prashantdubey55

ASKER

Thanks David,  for your help, and I will try out as per yr instructions and will get back to you!

prashant
Hi David

Great, following your instructions, I could open, apply & save the image in the same directory without changing the names.

But, I found strange thing, that whernever the action encounters *.gif, it used to end up in error. It does exactly as the actions for jpg, psd, png, but not to gif. The error reads something like theis:

File: "D:\from Root\Untitled-1.gif"
Error: The parameters for command "Save" are not currently valid. (-25923)

File: "D:\from Root\Word.gif"
Error: The parameters for command "Save" are not currently valid. (-25923)

I had assigned 'save as'  in my action, and in jpg format with compression 5
what could be the reason for not doing gif?!?!?!

Thanking you

Prasahnt

The major shortcoming of actions is that there is no conditional switch that lets Photoshop do one thing under one condition, and do something else if the condition is different.

I suspect that you are being asked for some additional parameters when you make the change from an RGB jpeg to a index colored gif. Photoshop usually wants to know if you want the gif to be a full 256 colors or not, if you want those colors to be taken from the image or made to snap to a web, a Mac, or a PC color chart, if you want to include transparency or not, etc.

I maintain a couple of ecommerce web sites. I have an action that takes my large images, crops them to the ratio that I need and reduces it to the size of my “large” images, applies sharpening and saves it as a jpeg. I use the batch command to add _lg to the name. I have similar actions for my small images and for my thumbnails.

Every once in a while I will get an image from a client that is saved as an index color. Photoshop creates an error when I try to save one of these images as a jpg. If I have these images in my folder to be batched, it will cause my batch to come to a halt, waiting for me to deal with the error.

I always use the option at the bottom of the batch dialogue box to write my errors to a text file. That way, the batch runs completely without stopping. I don’t get jpegs from the index color files when I run my action, but the errors that they produce are listed in the text file if any and I can deal with these few images individually.

If this were to happen on a regular basis, I could write a separate action that works on index color files (changing the color mode to RGB then saving as a jpg). I could then run this action on the entire batch while writing the errors to a log. It would then record an error for every jpeg that I tried to convert from index color to RGB, but who cares? I just ignore the log file, knowing that the first pass took care of my RGB files, the second pass took care of my images saved as index colors. I used to take a peek at the log just to make sure that there were no other errors, but I have a pretty dependable workflow and only look at the file if something unexpected happens.

David B
Indeed, the actions have long way to go, David!

Well, I think you have answered nicely my query, with great explanation. I thank you for your suggestions and time spent for giving me the solution.

I would accept the previous one as accepted answer.

Thanks a lot, David.

Cheers!

Prashant Dubey