Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a tool which writes some tags to a photo. On some photos it fails, and for those I want to open them in photoshop, and resave it with maximum quality (jpeg). Ideally I would like to do that from the command line as then I can just do:

for %a in (*.jpg) do mytool.exe "%a" || [AUTOMATED PROCESS HERE]

I tried first just doing photoshop.exe "%a" but it seems photoshop doesn't even accept a command line argument for what photo to open.

share|improve this question
up vote 9 down vote accepted

I would recommend using imagemagick to do this. It is a suite of command line tools for image manipulation. mogrify is the one you want for this job.

mogrify -quality 100 *.jpg

There are several ways to set the quality, this just shows one.

share|improve this answer

Your assumption is correct -- Photoshop does not allow command line options to do the things you're trying to do. Photoshop does, however, support macros which can be recorded and then run in batch process.

share|improve this answer
1  
Photoshop can also be automated from it's COM interface via WSH (vbscript/jscript etc) – Matthew Lock Dec 4 '09 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .