Re: [Gimp-user] Autoconvert photo files



On 09/11/2012 05:58 AM, Alexandre Prokoudine wrote:
On Tue, Sep 11, 2012 at 1:55 PM, EyeLand wrote:
Hello, how can autoconvert many photo files from eps to jpg with GIMP?

Mmm... Photo files in EPS? That's a novel thing :)

Depends of the operating system you are on. Any clues?

On Linux or anything GNU compatible, Imagemagick should do the
trick.  You might also want to make sure that ghostscript is
installed, just in case Imagemagick needs it to read EPS - I'm not
certain as I always seem to already have both installed when things
like this come up.

Once the necessary tools are on boar,d open a terminal in the
directory where the eps files are and do the command:

convert *.eps [name].jpg

Your output files will come out named [name]-0.jpg, [name]-1.jpg,
through [name]-n.jpg.  If the default DPI & compression do not work
for you, check the Imagemagick docs for usage of the -density and
-quality switches.

If managing the file names is a major issue, you might want to use a
"for" script - see sample below - that feeds the files to
Imagemagick one at a time and tells it to name them after the
originals.  (Adapted from another script, not tested, no guarantees!)

On a Microsoft platform, you should be able to install Imagemagick
in Cygwin - if it's worth the bother.  Since you have a "lof" of
files to process, it probably will be.

:o)

Steve


#!/bin/sh
# Requires:  Imagemagick and (maybe) ghostscript.
# To batch convert EPS to JPG, save this text as an .scr
# file, make executable, and run in same directory as files:

for f in *.eps;
do
echo "Processing $f"
convert "$f" "${f%.eps}.jpg"
done





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]