From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] system: grub: Use librsvg to convert SVG to PNG
Date: Fri, 02 Sep 2016 14:56:15 +0200 [thread overview]
Message-ID: <87fupilats.fsf@gnu.org> (raw)
In-Reply-To: <87lgzaloex.fsf@netris.org> (Mark H. Weaver's message of "Fri, 02 Sep 2016 04:02:46 -0400")
Hi Mark!
Mark H Weaver <mhw@netris.org> skribis:
> The attached patch eliminates the use of 'inkscape' and 'imagemagick' to
> convert our grub background image from SVG to PNG. The job is now done
> using 'librsvg' [1] via Guile's dynamic FFI. I was unable to perform
> the needed scaling using the 'rsvg-convert' program, so I had to use
> librsvg directly.
>
> As a side benefit, the resulting image quality should be superior when
> scaling is performed, because scaling is now effectively done in the
> vector representation during rendering, whereas previously it was done
> in the raster representation as a separate step.
>
> What do you think?
I think it’s excellent. :-)
> From a50f358b083cff4d156cd7116fee516952fc9bcf Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Fri, 2 Sep 2016 02:26:43 -0400
> Subject: [PATCH] system: grub: Use librsvg to convert SVG to PNG.
>
> * guix/build/svg.scm: New file.
> * Makefile.am (MODULES): Add it.
> * gnu/system/grub.scm (svg->png): Add 'width' and 'height' arguments.
> Reimplement using (guix build svg). Drop references to 'inkscape' and
> 'imagemagick'.
> (resize-image): Remove.
> (grub-background-image): Adapt to the incorporation of scaling into
> 'svg->png'.
[...]
> +(define-module (guix build svg)
> + #:use-module (ice-9 match)
> + #:use-module (system foreign)
> + #:use-module (rnrs bytevectors)
> + #:export (svg->png))
Is there are reason for not using guile-rsvg and guile-cairo? Otherwise
I think it would be preferable (they’d need to be autoloaded so that
‘make’ doesn’t fail when they’re missing, but that’s OK.)
I found an example that Andy had posted:
https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00753.html
Thank you!
Ludo’.
next prev parent reply other threads:[~2016-09-02 12:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 8:02 [PATCH] system: grub: Use librsvg to convert SVG to PNG Mark H Weaver
2016-09-02 12:56 ` Ludovic Courtès [this message]
2016-10-24 23:24 ` Ludovic Courtès
2016-10-25 0:07 ` Leo Famulari
2016-10-31 21:57 ` Ludovic Courtès
2016-09-02 15:24 ` Vincent Legoll
2016-09-03 12:59 ` Vincent Legoll
2016-09-05 9:31 ` Vincent Legoll
2016-09-05 20:30 ` Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fupilats.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.