When I needed to do a similar thing some time ago, I couldn't work out how to 
do this with script-fu: Lisp! I'm very bad at lisp. (Couldn't yet get 
Python-GIMP to run on windows then).
And I couldn't figure out how to actually scale the image with any of the 
available GIMP functions: there's a number of them that scale images, with 
confusing (for me) parameters.

So I decided to do it either with Python/PIL, or with ImageMagick. After some 
investigation I decided for Python/PIL since all my images were JPEGS, but they 
were not all the same size  (some where landscape, some portrait; and not all 
of them the same height/widt aspect-ratio) but they still all needed to fit 
within the same rectangle (1024x768 in my case).
So I wrote a python-script that checks the image sizes and figures out the 
correct size for that image. Doing so with ImageMagick seemed a lot more 
complicated to me for a number of reasons; especially not doable from a plain 
The images produced by PIL were also a good 100Kb smaller than the images 
produced by ImageMagick, with no quality-difference that I could see with my 
eyes (perhaps a slight preference with the PIL produced JPEGs even).

So I did it with PIL/Python.

If I could figure out how to get the Python/GIMP integration running on my 
Win32 machine I might rewrite it to work with GIMP though, because it'll 
recognize more image-types and gives me a better feeling. ;)

As you see, there's all sorts of factors involved in choosing the right tool 
for the job! :)


Gimp-user mailing list

Reply via email to