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



Hmm... I'm not sure why the scripting system is continuously dismissed as a
viable solution.  Is your answer that it's not viable.  Requoting:

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.


- Tres Finocchiaro gmail com


On Tue, Apr 21, 2020 at 3:54 PM Guy Stalnaker <jimmyg521 gmail com> wrote:

Tres,

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

https://www.imagemagick.org/script/download.php

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):

https://gmic.eu/download.shtml

Both of these tools can be scripted.

Regards.

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:

Hi,

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.


http://www.jasonhardin.com/programming/2012/08/23/Gimp-svg-to-png-script/#disqus_thread

The script I'm running:
gimp -i --batch='(svg-to-raster "src.svg" "dst.png" 72 0 0)'
--batch='(gimp-quit
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

- Tres Finocchiaro gmail com
_______________________________________________
gimp-user-list mailing list
List address:    gimp-user-list gnome org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list




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