Skip to content

Instantly share code, notes, and snippets.

@tresf
Created April 21, 2020 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tresf/c06aac6ceb51b86f328c3655fb503efe to your computer and use it in GitHub Desktop.
Save tresf/c06aac6ceb51b86f328c3655fb503efe to your computer and use it in GitHub Desktop.
;;; 2014 - Matthew Gates
(define (svg-to-raster infile
outfile
resolution
xmax
ymax)
(let* ((image (car (file-svg-load
RUN-NONINTERACTIVE
infile
""
resolution
(- 0 xmax)
(- 0 ymax)
0
)
)
)
(drawable (car (gimp-image-get-active-layer image))))
(plug-in-autocrop RUN-NONINTERACTIVE image drawable)
(gimp-file-save RUN-NONINTERACTIVE image drawable outfile outfile)
(gimp-image-delete image)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment