[XeTeX] graphics aspect ratio
Diederick C. Niehorster
dcnieho at gmail.com
Sat Feb 13 15:02:31 CET 2010
Hi Wybo, others,
Follow up on the GIMP batch script I promised.
This script was pretty cool, I used it to do high quality image
converting from matlab without access to the image processing toolbox
(note you could also use interp2, but that requires huge amounts of
memory somehow...). This, together with scripting virtualdub, made it
possible to do a lot of processing automatically, let me know if
interested in exerpts from those scripts.
GIMP is frustrating to work with, due to its "great" error reporting
("batch command: experienced an execution error." is all you ever
get). It's been over two years now (I think), but I somehow managed to
change a script I found somewhere for scaling a single image into this
batch processor with separate input and output directories. I got some
help on a forum somewhere, but fail to remember where. Let me try to
google more later.
Here's a stream of conciousness/memory, hope I'm not forgetting
Anyway, the attached script does the job, the help header inside tells
you how to invoke it from the command line. First, you have to put the
script into GIMP's script folder (for me that was C:\Program
Files\GIMP\share\gimp\2.0\scripts, I don't know if there is one in the
user folders of windows as well, and dont know about other platforms.
Once in there, gimp should be able to find it. From the command line,
you can call any GIMP script, now this one as well. Note the calling
syntax is nasty, you need some escaping for both the windows command
line and the GIMP command interpreter if I remember correctly. Anyway,
this should get you started. Last disclaimer, this script was
developed with gimp 2.4 and also ran with 2.6, I havent needed it
lately, so don't know how it does with the newest gimp version. Oh
yeah, at that time, it wasn't possible to specify the scaling
algorithm used (nearest neighbour, bicubic, etc), I don't know if that
is possible by now. My trick was this: open gimp and go to the
preferences/settings. Then set your default scaling algorythm to the
one you want the script to use, apply, done!
Note that using the script only requires one call on the command line,
the batching happens inside the GIMP script. Also note that when you
make the call, a new instance of gimp starts up, so it isn't fast the
first time you run it, and it isn't really recommended for only a few
Good luck :)
On Sat, Feb 13, 2010 at 4:51 PM, Wybo Dekker <wybo at servalys.nl> wrote:
> Diederick C. Niehorster wrote:
>> GIMP is actually very handy for batch processing of hundreds of
>> pictures, only it requires some understading of its LISP-like script
>> language (hope I'm not misclassifying here). I (should) have a script
>> that does batch scaling of a directory and can be called from the
>> command line at home somewhere, let me see if I can find it tonight.
> a good example helps a lot at the start, I'm very interested!
> Subscriptions, Archive, and List information, etc.:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3327 bytes
Desc: not available
More information about the XeTeX