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

2020-04-23 Thread Tres Finocchiaro via gimp-user-list
Link to originating question: https://superuser.com/a/1545028/443147

- tres.finocchi...@gmail.com


On Thu, Apr 23, 2020 at 1:51 PM Tres Finocchiaro 
wrote:

> Ok, I got it.  Had to remove all single quotes and use backslash instead
> of uptick to escape the double-quotes.
>
> Here's a working Windows example:
> https://gist.github.com/tresf/1bd76fc8cd4a4def215c68cab990dfb1
>
> Thanks again for the help.
>
>
> - tres.finocchi...@gmail.com
>
>
> On Thu, Apr 23, 2020 at 1:39 PM Tres Finocchiaro <
> tres.finocchi...@gmail.com> wrote:
>
>> Are there any known caveats to running these command on Windows?
>>
>> I'm testing the above with CMD and no matter how I run it, it pops up a
>> dialog asking me what resolution to import the file at, I can't get it to
>> run non-interactively.
>>
>>- I've tried escaping the asterisks
>>- I've tried gimp-2.10.exe
>>- I've tried gimp-console-2.10.exe
>>- I've tried swapping single quotes and double-quotes
>>
>> It works on macOS Gimp 2.10.14 but does not work on Windows using Gimp
>> 2.10.18.
>>
>>  When I try to run the first portion interactively, I receive the
>> following errors:
>>
>>- Opening *'C:\Users\owner\Desktop\((image'* failed: Error opening
>>file C:\Users\owner\Desktop\((image: No such file or directory
>>- Opening *'C:\Users\owner\Desktop\(car'* failed: Error opening file
>>C:\Users\owner\Desktop\(car: No such file or directory
>>- Opening *'C:\Users\owner\Desktop\(file-svg-load'* failed: Error
>>opening file C:\Users\owner\Desktop\(file-svg-load: No such file or
>>directory
>>
>> I've tried using PowerShell and receive very similar results.  What am I
>> doing wrong?
>>
>>
>> -Tres
>>
>> - tres.finocchi...@gmail.com
>>
>>
>> On Thu, Apr 23, 2020 at 11:51 AM Tres Finocchiaro <
>> tres.finocchi...@gmail.com> wrote:
>>
>>> A one-liner using Gimp and no other tools:
>>>
>>> ./gimp -i -b '(let* ((image (car (file-svg-load RUN-NONINTERACTIVE
>>> *"input.svg"* "" *72* (- 0 *400*) (- 0 *600*) 0))) (drawable (car
>>> (gimp-image-get-active-layer image (plug-in-autocrop RUN-NONINTERACTIVE
>>> image drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable
>>> *"output.png"* *"output.png"*) (gimp-image-delete image))' -b
>>> '(gimp-quit 0)'
>>>
>>> Where:
>>>
>>>- "input.svg" is the source file name
>>>- 72 is the output resolution in pixels-per-inch
>>>- 400 is the output width
>>>- 600 is the output height
>>>- "output.png" is the output file name
>>>
>>> -Tres
>>>
>>>
>>> - tres.finocchi...@gmail.com
>>>
>>>
>>> On Tue, Apr 21, 2020 at 6:26 PM Liam R E Quin  wrote:
>>>
 On Tue, 2020-04-21 at 16:39 -0400, Tres Finocchiaro wrote:
 > Liam,
 >
 > After re-reading your post, is it safe to assume my original question
 > was written in scheme/script-fu?

 Probably the script you were running, the one you didn't includeand got
 from Web archive, was in Scheme, yes.

 It's a text file, and the likely error from the message is that it
 calls file-png to export, and not file-png-save.

 >
 > If so, can someone direct me how to get a list of scheme commands
 > that can
 > be executed from a vanilla gimp install?

 Help->Procedure Browser

 slave liam

 --
 Liam Quin - web slave for https://www.fromoldbooks.org/
 with fabulous vintage art and fascinating texts to read.
 Click here to have the slave beaten.


___
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


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

2020-04-23 Thread Tres Finocchiaro via gimp-user-list
Ok, I got it.  Had to remove all single quotes and use backslash instead of
uptick to escape the double-quotes.

Here's a working Windows example:
https://gist.github.com/tresf/1bd76fc8cd4a4def215c68cab990dfb1

Thanks again for the help.


- tres.finocchi...@gmail.com


On Thu, Apr 23, 2020 at 1:39 PM Tres Finocchiaro 
wrote:

> Are there any known caveats to running these command on Windows?
>
> I'm testing the above with CMD and no matter how I run it, it pops up a
> dialog asking me what resolution to import the file at, I can't get it to
> run non-interactively.
>
>- I've tried escaping the asterisks
>- I've tried gimp-2.10.exe
>- I've tried gimp-console-2.10.exe
>- I've tried swapping single quotes and double-quotes
>
> It works on macOS Gimp 2.10.14 but does not work on Windows using Gimp
> 2.10.18.
>
>  When I try to run the first portion interactively, I receive the
> following errors:
>
>- Opening *'C:\Users\owner\Desktop\((image'* failed: Error opening
>file C:\Users\owner\Desktop\((image: No such file or directory
>- Opening *'C:\Users\owner\Desktop\(car'* failed: Error opening file
>C:\Users\owner\Desktop\(car: No such file or directory
>- Opening *'C:\Users\owner\Desktop\(file-svg-load'* failed: Error
>opening file C:\Users\owner\Desktop\(file-svg-load: No such file or
>directory
>
> I've tried using PowerShell and receive very similar results.  What am I
> doing wrong?
>
>
> -Tres
>
> - tres.finocchi...@gmail.com
>
>
> On Thu, Apr 23, 2020 at 11:51 AM Tres Finocchiaro <
> tres.finocchi...@gmail.com> wrote:
>
>> A one-liner using Gimp and no other tools:
>>
>> ./gimp -i -b '(let* ((image (car (file-svg-load RUN-NONINTERACTIVE
>> *"input.svg"* "" *72* (- 0 *400*) (- 0 *600*) 0))) (drawable (car
>> (gimp-image-get-active-layer image (plug-in-autocrop RUN-NONINTERACTIVE
>> image drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable
>> *"output.png"* *"output.png"*) (gimp-image-delete image))' -b
>> '(gimp-quit 0)'
>>
>> Where:
>>
>>- "input.svg" is the source file name
>>- 72 is the output resolution in pixels-per-inch
>>- 400 is the output width
>>- 600 is the output height
>>- "output.png" is the output file name
>>
>> -Tres
>>
>>
>> - tres.finocchi...@gmail.com
>>
>>
>> On Tue, Apr 21, 2020 at 6:26 PM Liam R E Quin  wrote:
>>
>>> On Tue, 2020-04-21 at 16:39 -0400, Tres Finocchiaro wrote:
>>> > Liam,
>>> >
>>> > After re-reading your post, is it safe to assume my original question
>>> > was written in scheme/script-fu?
>>>
>>> Probably the script you were running, the one you didn't includeand got
>>> from Web archive, was in Scheme, yes.
>>>
>>> It's a text file, and the likely error from the message is that it
>>> calls file-png to export, and not file-png-save.
>>>
>>> >
>>> > If so, can someone direct me how to get a list of scheme commands
>>> > that can
>>> > be executed from a vanilla gimp install?
>>>
>>> Help->Procedure Browser
>>>
>>> slave liam
>>>
>>> --
>>> Liam Quin - web slave for https://www.fromoldbooks.org/
>>> with fabulous vintage art and fascinating texts to read.
>>> Click here to have the slave beaten.
>>>
>>>
___
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


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

2020-04-23 Thread Tres Finocchiaro via gimp-user-list
Are there any known caveats to running these command on Windows?

I'm testing the above with CMD and no matter how I run it, it pops up a
dialog asking me what resolution to import the file at, I can't get it to
run non-interactively.

   - I've tried escaping the asterisks
   - I've tried gimp-2.10.exe
   - I've tried gimp-console-2.10.exe
   - I've tried swapping single quotes and double-quotes

It works on macOS Gimp 2.10.14 but does not work on Windows using Gimp
2.10.18.

 When I try to run the first portion interactively, I receive the following
errors:

   - Opening *'C:\Users\owner\Desktop\((image'* failed: Error opening file
   C:\Users\owner\Desktop\((image: No such file or directory
   - Opening *'C:\Users\owner\Desktop\(car'* failed: Error opening file
   C:\Users\owner\Desktop\(car: No such file or directory
   - Opening *'C:\Users\owner\Desktop\(file-svg-load'* failed: Error
   opening file C:\Users\owner\Desktop\(file-svg-load: No such file or
   directory

I've tried using PowerShell and receive very similar results.  What am I
doing wrong?


-Tres

- tres.finocchi...@gmail.com


On Thu, Apr 23, 2020 at 11:51 AM Tres Finocchiaro <
tres.finocchi...@gmail.com> wrote:

> A one-liner using Gimp and no other tools:
>
> ./gimp -i -b '(let* ((image (car (file-svg-load RUN-NONINTERACTIVE
> *"input.svg"* "" *72* (- 0 *400*) (- 0 *600*) 0))) (drawable (car
> (gimp-image-get-active-layer image (plug-in-autocrop RUN-NONINTERACTIVE
> image drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable
> *"output.png"* *"output.png"*) (gimp-image-delete image))' -b '(gimp-quit
> 0)'
>
> Where:
>
>- "input.svg" is the source file name
>- 72 is the output resolution in pixels-per-inch
>- 400 is the output width
>- 600 is the output height
>- "output.png" is the output file name
>
> -Tres
>
>
> - tres.finocchi...@gmail.com
>
>
> On Tue, Apr 21, 2020 at 6:26 PM Liam R E Quin  wrote:
>
>> On Tue, 2020-04-21 at 16:39 -0400, Tres Finocchiaro wrote:
>> > Liam,
>> >
>> > After re-reading your post, is it safe to assume my original question
>> > was written in scheme/script-fu?
>>
>> Probably the script you were running, the one you didn't includeand got
>> from Web archive, was in Scheme, yes.
>>
>> It's a text file, and the likely error from the message is that it
>> calls file-png to export, and not file-png-save.
>>
>> >
>> > If so, can someone direct me how to get a list of scheme commands
>> > that can
>> > be executed from a vanilla gimp install?
>>
>> Help->Procedure Browser
>>
>> slave liam
>>
>> --
>> Liam Quin - web slave for https://www.fromoldbooks.org/
>> with fabulous vintage art and fascinating texts to read.
>> Click here to have the slave beaten.
>>
>>
___
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


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

2020-04-23 Thread Tres Finocchiaro via gimp-user-list
A one-liner using Gimp and no other tools:

./gimp -i -b '(let* ((image (car (file-svg-load RUN-NONINTERACTIVE
*"input.svg"* "" *72* (- 0 *400*) (- 0 *600*) 0))) (drawable (car
(gimp-image-get-active-layer image (plug-in-autocrop RUN-NONINTERACTIVE
image drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable
*"output.png"* *"output.png"*) (gimp-image-delete image))' -b '(gimp-quit
0)'

Where:

   - "input.svg" is the source file name
   - 72 is the output resolution in pixels-per-inch
   - 400 is the output width
   - 600 is the output height
   - "output.png" is the output file name

-Tres


- tres.finocchi...@gmail.com


On Tue, Apr 21, 2020 at 6:26 PM Liam R E Quin  wrote:

> On Tue, 2020-04-21 at 16:39 -0400, Tres Finocchiaro wrote:
> > Liam,
> >
> > After re-reading your post, is it safe to assume my original question
> > was written in scheme/script-fu?
>
> Probably the script you were running, the one you didn't includeand got
> from Web archive, was in Scheme, yes.
>
> It's a text file, and the likely error from the message is that it
> calls file-png to export, and not file-png-save.
>
> >
> > If so, can someone direct me how to get a list of scheme commands
> > that can
> > be executed from a vanilla gimp install?
>
> Help->Procedure Browser
>
> slave liam
>
> --
> Liam Quin - web slave for https://www.fromoldbooks.org/
> with fabulous vintage art and fascinating texts to read.
> Click here to have the slave beaten.
>
>
___
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


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

2020-04-21 Thread Liam R E Quin
On Tue, 2020-04-21 at 16:39 -0400, Tres Finocchiaro wrote:
> Liam,
> 
> After re-reading your post, is it safe to assume my original question
> was written in scheme/script-fu?

Probably the script you were running, the one you didn't includeand got
from Web archive, was in Scheme, yes.

It's a text file, and the likely error from the message is that it
calls file-png to export, and not file-png-save.

> 
> If so, can someone direct me how to get a list of scheme commands
> that can
> be executed from a vanilla gimp install?

Help->Procedure Browser

slave liam

-- 
Liam Quin - web slave for https://www.fromoldbooks.org/
with fabulous vintage art and fascinating texts to read.
Click here to have the slave beaten.

___
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


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

2020-04-21 Thread Tres Finocchiaro via gimp-user-list
Michael,

You're completely right, the web archive of that original post has it for
download.  Here's the web archive article, which specifically mentions
downloading svg-to-raster.scm.

https://web.archive.org/web/20140214102644/http://porpoisehead.net/mysw/index.php?pgid=gimp_svg

Fortunately, web archive had a copy of the scheme source.  I've re-hosted
it here: https://gist.github.com/tresf/c06aac6ceb51b86f328c3655fb503efe

I'll continue down this path and share my progress.  Thanks kindly!


- tres.finocchi...@gmail.com


On Tue, Apr 21, 2020 at 4:57 PM Michael Schumacher  wrote:

>
>
> On 4/21/20 9:47 PM, Tres Finocchiaro via gimp-user-list wrote:
>
> > 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
> What you found is just the command line being used to run a custom
> script someone wrote - I assume this was available from one of the
> now-defunct links in the message you linked to.
>
> In short: what you have found and posted is not a complete script, not
> by far.
>
> In principle, the actual script was likely similar to the examples in
> https://www.gimp.org/tutorials/Basic_Batch/ - with different parameters,
> though, as it only really needs to open a file and export it with a
> different file name.
>
>
> --
> Regards,
> Michael
> GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD
> ___
> 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
>
___
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


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

2020-04-21 Thread Michael Schumacher



On 4/21/20 9:47 PM, Tres Finocchiaro via gimp-user-list wrote:

> 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
What you found is just the command line being used to run a custom
script someone wrote - I assume this was available from one of the
now-defunct links in the message you linked to.

In short: what you have found and posted is not a complete script, not
by far.

In principle, the actual script was likely similar to the examples in
https://www.gimp.org/tutorials/Basic_Batch/ - with different parameters,
though, as it only really needs to open a file and export it with a
different file name.


--
Regards,
Michael
GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD
___
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


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

2020-04-21 Thread Tres Finocchiaro via gimp-user-list
Liam,

After re-reading your post, is it safe to assume my original question was
written in scheme/script-fu?

If so, can someone direct me how to get a list of scheme commands that can
be executed from a vanilla gimp install?

- tres.finocchi...@gmail.com


On Tue, Apr 21, 2020 at 4:36 PM Tres Finocchiaro 
wrote:

> I'm confused, I'm attempting to use the gimp command line, is it no longer
> supported?  Why am I being told to use other tools still?
>
> This is a specific attempt to use Gimp for a task.  No additional software
> installed.  If Gimp ships with a usable version of python in a reliable
> location, I'd be happy to leverage that, but the question is in regards to
> a target system with only Gimp installed, assuming it doesn't have
> Inkscape, ImageMagick Python or Perl.
>
> I'm asking how to use the gimp command line only.
>
> - tres.finocchi...@gmail.com
>
>
> On Tue, Apr 21, 2020 at 4:24 PM Liam R E Quin  wrote:
>
>> On Tue, 2020-04-21 at 15:47 -0400, Tres Finocchiaro via gimp-user-list
>> wrote:
>> >
>> >
>> > I was wonder if there was a way to utilize Gimp's scripting system to
>> > convert an SVG to a PNG?
>>
>> Yes, from python, perl or scheme (script-fu).
>>
>> there's also batch mode add-ons such as phatch.
>>
>> You might prefer to use Inkscape for this one - it can do this in the
>> command-line.
>>
>>
>> >
>> > The best resource I've found is here however, attempts to run this on
>> > my
>> > machine are failing using GIMP 2.1.0.
>>
>> Hoping you mean 2.10.18
>>
>> > I'm using MacOS to write the script, but the target platform is
>> > Windows.
>>
>> We are a release behind n the Mac because we don't have a Mac
>> maintainer right now.
>>
>> > 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.
>>
>> For the error you're getting try changing file-svg to file-svg-save
>> maybe.
>>
>> slave
>>
>> --
>> Liam Quin - https://www.fromoldbooks.org/
>>
>> Slave in full-time voluntary servitude
>>
>>
___
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


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

2020-04-21 Thread Tres Finocchiaro via gimp-user-list
I'm confused, I'm attempting to use the gimp command line, is it no longer
supported?  Why am I being told to use other tools still?

This is a specific attempt to use Gimp for a task.  No additional software
installed.  If Gimp ships with a usable version of python in a reliable
location, I'd be happy to leverage that, but the question is in regards to
a target system with only Gimp installed, assuming it doesn't have
Inkscape, ImageMagick Python or Perl.

I'm asking how to use the gimp command line only.

- tres.finocchi...@gmail.com


On Tue, Apr 21, 2020 at 4:24 PM Liam R E Quin  wrote:

> On Tue, 2020-04-21 at 15:47 -0400, Tres Finocchiaro via gimp-user-list
> wrote:
> >
> >
> > I was wonder if there was a way to utilize Gimp's scripting system to
> > convert an SVG to a PNG?
>
> Yes, from python, perl or scheme (script-fu).
>
> there's also batch mode add-ons such as phatch.
>
> You might prefer to use Inkscape for this one - it can do this in the
> command-line.
>
>
> >
> > The best resource I've found is here however, attempts to run this on
> > my
> > machine are failing using GIMP 2.1.0.
>
> Hoping you mean 2.10.18
>
> > I'm using MacOS to write the script, but the target platform is
> > Windows.
>
> We are a release behind n the Mac because we don't have a Mac
> maintainer right now.
>
> > 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.
>
> For the error you're getting try changing file-svg to file-svg-save
> maybe.
>
> slave
>
> --
> Liam Quin - https://www.fromoldbooks.org/
>
> Slave in full-time voluntary servitude
>
>
___
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


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

2020-04-21 Thread Liam R E Quin
On Tue, 2020-04-21 at 15:47 -0400, Tres Finocchiaro via gimp-user-list
wrote:
> 
> 
> I was wonder if there was a way to utilize Gimp's scripting system to
> convert an SVG to a PNG?

Yes, from python, perl or scheme (script-fu).

there's also batch mode add-ons such as phatch.

You might prefer to use Inkscape for this one - it can do this in the
command-line.


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

Hoping you mean 2.10.18

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

We are a release behind n the Mac because we don't have a Mac
maintainer right now.

> 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.

For the error you're getting try changing file-svg to file-svg-save
maybe.

slave

-- 
Liam Quin - https://www.fromoldbooks.org/

Slave in full-time voluntary servitude

___
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


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

2020-04-21 Thread Tres Finocchiaro via gimp-user-list
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.finocchi...@gmail.com


On Tue, Apr 21, 2020 at 3:54 PM Guy Stalnaker  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
> jimmyg...@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.finocchi...@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
>>
>
___
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


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

2020-04-21 Thread Guy Stalnaker via gimp-user-list
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
jimmyg...@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.finocchi...@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
>
___
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


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

2020-04-21 Thread Tres Finocchiaro via gimp-user-list
Apologies, typo:
Error: eval: unbound variable: file-svg

Should have been:
Error: eval: unbound variable: *svg-to-raster *



- tres.finocchi...@gmail.com


On Tue, Apr 21, 2020 at 3:47 PM Tres Finocchiaro 
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.finocchi...@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