Help with GIMP Scripting

Hi,

Does anyone know how to write one? I want to take a directory full of images, apply a Bevel, and close the image.

That’s all.

Thanks.

I don’t know about Gimp scripting, but adding a bevel should be fairly easy to do with ImageMagick using the “frame” command:
http://www.imagemagick.org/Usage/crop/#frame

I would just use a Unix shell and invoke the code on each image using a loop.

For example using CSH:

mkdir framed foreach image (*.png) convert $image -frame 3x3+3+0 framed/$image end

This creates a directory called framed to hold the converted images.
It then goes through all of the *.png files, adds the bevel and writes them in the framed directory.

Attached is a sample.

-Tom.[/code]

Though I use Gimp all the time, I use ImageMagick for this sort of scripting. I typically run something like this over my source artwork:

convert ./Orig/ge-10Mot-back.png +dither -colors 256 -raise 2x2 -resize 46x46! ./Small/ge-10Mot-back.png


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I prefer the “raise” command as the image continues over the bevel, rather than having a seperate colored bevel frame.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thanks for the help.

I just can’t seem to grok the GIMP scripting. Guess that is why I’m not much of a programmer.

I’ve tried using XnView as it has a nice easy Batch Processing function, but it makes harder angular bevels. I’m trying to create the more natural rounded look.

I’ve attached examples. YMMV. Which does ImageMagick do?

On Mar 10, 2010, at 5:51 PM, Brent Easton wrote:

Yes, that does seem nicer.
I just did a very quick look at the ImageMagick documentation.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On Mar 11, 2010, at 4:56 AM, spetras73 wrote:

It does the harder, angular bevels by default.

I’m sure that there’s a way to get it to do the rounded corners as
well, probably by a second processing step.

I think what you would need to do is create a rounded rectangle object
of the correct size and then using
-compose In
with the rounded rectangle as the background should round the
corners. But I would have to experiment a bit to see exactly how to
do it.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

That’s ok, I appreciate the thought. GIMP does the rounded bevel in one step, I was just hoping to automate the process.