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



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 Finocchiaro gmail com


On Tue, Apr 21, 2020 at 6:26 PM Liam R E Quin <liam holoweb net> 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.




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