Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resize and convert a SVG image using a gimp script ?
#1
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:
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 ?
Reply


Messages In This Thread
Resize and convert a SVG image using a gimp script ? - by Alpha504 - 11-12-2024, 04:24 PM

Forum Jump: