Created
April 21, 2020 21:03
-
-
Save tresf/c06aac6ceb51b86f328c3655fb503efe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 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