Re: [Gimp-user] SVG to PNG using a script


Several perhaps better options are tools intended for command line use:

Or, for considerably more sophisticated image work (with correspondingly
more detailed and opaque documentation) G'MIC (which also has a builtin
tool for use inside GIMP usually packaged with GIMP):

Both of these tools can be scripted.


Guy Stalnaker
jimmyg521 gmail com

On Tue, Apr 21, 2020 at 2:47 PM Tres Finocchiaro via gimp-user-list <
gimp-user-list gnome org> wrote:


I'm looking into Gimp as a viable scripting solution for a project however
most of the scripting references I'm finding are either sparse or dated.

I was wonder if there was a way to utilize Gimp's scripting system to
convert an SVG to a PNG?

The best resource I've found is here however, attempts to run this on my
machine are failing using GIMP 2.1.0.

The script I'm running:
gimp -i --batch='(svg-to-raster "src.svg" "dst.png" 72 0 0)'

Unfortunately it throws the following error:
batch command experienced an execution error:
Error: eval: unbound variable: file-svg

I'm using MacOS to write the script, but the target platform is Windows.

I understand there are many other tools for performing this conversion (and
I'm leveraging these tools in other parts of code) but I was hoping to
write this as a fallback for this particular system.

Best regards,


- Tres Finocchiaro gmail com
gimp-user-list mailing list
List address:    gimp-user-list gnome org
List membership:
List archives:

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