Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

up vote 7 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 can do it, just not directly:

Running Photoshop script from Command Prompt

share|improve this answer
1  
this could be a good answer if you flesh it out a little. what's at the link? a tool you could describe? a technique you could summarize? link-only answers really don't make good answers here. –  quack quixote Apr 20 '10 at 4:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.