From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] system: grub: Use librsvg to convert SVG to PNG Date: Fri, 02 Sep 2016 14:56:15 +0200 Message-ID: <87fupilats.fsf@gnu.org> References: <87lgzaloex.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfo1A-0003tw-Dk for guix-devel@gnu.org; Fri, 02 Sep 2016 08:56:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfo15-0000ZC-3e for guix-devel@gnu.org; Fri, 02 Sep 2016 08:56:23 -0400 In-Reply-To: <87lgzaloex.fsf@netris.org> (Mark H. Weaver's message of "Fri, 02 Sep 2016 04:02:46 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mark H Weaver Cc: guix-devel@gnu.org Hi Mark! Mark H Weaver 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=E2=80=99s excellent. :-) > From a50f358b083cff4d156cd7116fee516952fc9bcf Mon Sep 17 00:00:00 2001 > From: Mark H Weaver > 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=E2=80=99d need to be autoloaded so that =E2=80=98make=E2=80=99 doesn=E2=80=99t fail when they=E2=80=99re missing, b= ut that=E2=80=99s OK.) I found an example that Andy had posted: https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00753.html Thank you! Ludo=E2=80=99.