Re: [Gimp-user] Batch processing?
- From: Steve Kinney <admin pilobilus net>
- To: gimp-user-list gnome org
- Subject: Re: [Gimp-user] Batch processing?
- Date: Mon, 22 Apr 2013 17:45:53 -0400
On 04/21/2013 05:58 PM, Anime Dude wrote:
When using command line gimp, is it possible to use *.jpg as the
file name to have it process ALL the JPEG files in a folder? I'm
really actually interested in a simple file format conversion with
no image processing applied, specifically svg2png conversion. I know
Gimp can render svg and can save png, and unlike the next best
program ImageMagick, the Gimp actually DOES NOT GLITCH the resulting
image! So I've got a folder FULL OF SVG FILES, and would like to be
able to just type "gimp convert -i *.svg -outputformat png" and have
have it AUTOMATICALLY convert all my svg files to png files. Is it
possible to do this with such a simple and short command line? I
know the above exact example command line doesn't work, cause I
tried it. But is there some simillarly simple command line code I
could use with gimp to convert svg to png via rendering the svg and
then saving the image as a png?
"There's an app for that." :o)
Imagemagick is a Swiss Army Knife for doing operations on image
files from the terminal, including format conversions. I use this
batch script, with file format extensions changed as necessary, for
batch conversions:
#!/bin/sh
# svg to png is only an example, change as needed
for f in *.svg;
do
echo "converting $f"
convert "$f" "${f%.svg}.png"
done
Save the above text in a plaintext file, give it a name with a .sh
extension and make it executable. Copy it to the directory your
target files live in, run it with ./script-name.sh and watch the fun.
The above should work on any UNIX-like OS. According to the
Sourceforge page, a package for Microsoft is also available.
:o)
Steve
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]