6

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.

3 Answers 3

8

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.

1

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.

1
  • 1
    Photoshop can also be automated from it's COM interface via WSH (vbscript/jscript etc) Dec 4, 2009 at 7:26
1

Actually, you can do this very easy in Photoshop with the creation of small executable tasks that run Photoshop macros (actions). This is called a Photoshop Droplet

http://www.dummies.com/software/adobe/photoshop/how-to-create-droplets-in-photoshop-cs6/

You must log in to answer this question.

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