11-12-2024, 04:24 PM
I'm using gimp 2.10 on a Debian 12 system.
My gimp script successfully convert the SVG to PNG, but it doesn't resize it.
Here is my script ~/.config/GIMP/2.10/scripts/convertresize.scm:
I launch it with the following command:
So, if someone knows what I'm doing wrong ?
My gimp script successfully convert the SVG to PNG, but it doesn't resize it.
Here is my script ~/.config/GIMP/2.10/scripts/convertresize.scm:
Code:
(define (convertresize in_filename out_filename width height)
(let* (
(image (car (gimp-file-load RUN-NONINTERACTIVE in_filename "")))
(drawable (car (gimp-image-get-active-layer image)))
(gimp-image-scale-full image width height INTERPOLATION-CUBIC)
(gimp-layer-resize-to-image-size drawable)
)
(gimp-file-save RUN-NONINTERACTIVE image drawable out_filename out_filename)
(gimp-image-delete image)
)
)
I launch it with the following command:
Code:
gimp -i -b '(convertresize "./image.svg" "./image.png" 24 24)' -b '(gimp-quit 0)'
So, if someone knows what I'm doing wrong ?