Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Import SVG through console as done through UI
#4
(02-16-2024, 01:35 AM)kthedude Wrote: I used the following set of commands in the interactive console (running gimp --verbose -b -) and received the error "Error: Invalid type of argument 1 to gimp-image-get-active-layer"

Code:
(define myImage (file-svg-load 1 "infile.svg" "infile.svg" 90.0 0 0 0))
(file-png-save-defaults 1 myImage (gimp-image-get-active-layer myImage) "outfile.png" "outfile.png")

And if I run the following directly from the console, I get the error "unbound variable: myImage"

Code:
--verbose -b '(define myImage (file-svg-load 1 "infile.svg" "infile.svg" 90.0 0 0 0))' -b '(file-png-save-defaults 1 myImage (gimp-image-get-active-layer myImage) "outfile.png" "outfile.png")'

I appreciate the tip on ImageMagick, I used it successfully just now. I had seen some others say that it was not a good tool for SVGs and so I didn't peruse it.

However, I would like to know in practice how this would be done in gimp if possible.

I don't know Scheme but I think define myImage... should be let myImage...
Reply


Messages In This Thread
RE: How to Import SVG through console as done through UI - by Ofnuts - 02-16-2024, 09:01 AM

Forum Jump: