[Gimp-developer] converting svg to png with black background
- From: Matt Becker <mattbecker3240 yahoo com>
- To: "gimp-developer-list gnome org" <gimp-developer-list gnome org>
- Subject: [Gimp-developer] converting svg to png with black background
- Date: Fri, 20 Sep 2013 11:01:31 -0700 (PDT)
Hi,
not sure if this is the right mailing list, I'm trying to convert svg to png (which is working), I just need 
to get the background black.
Here's my scm script:
(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)
    )
  )
I want a non-antialiased png with black background as the final result, currently background is transparent.
See attached for my original svg image. It's converting fine from shell (other than black background) via:
gimp -i -b '( svg-to-raster "special_areas.svg" "special_areas.png" 72 0 0)' -b '(gimp-quit 0)'
thanks
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]