From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Luis_Felipe_L=C3=B3pez_Acevedo?= Subject: Re: [PATCH] system: grub: Convert grub background using rsvg-convert Date: Fri, 28 Aug 2015 12:15:49 -0500 Message-ID: References: <87egitx3r7.fsf@netris.org> <87twrkwhs9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVNG5-0005bX-AO for guix-devel@gnu.org; Fri, 28 Aug 2015 13:16:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVNG2-0002uk-34 for guix-devel@gnu.org; Fri, 28 Aug 2015 13:16:09 -0400 In-Reply-To: <87twrkwhs9.fsf@gnu.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: ludo@gnu.org Cc: guix-devel@gnu.org On 2015-08-27 16:19, ludo@gnu.org wrote: > Mark H Weaver skribis: >=20 >> This patch modifies 'svg->png' in (gnu system grub) to use=20 >> rsvg-convert >> instead of inkscape. Inkscape is a rather heavy dependency to convert >> an image. This is important for users who choose to avoid binary >> substitutes. >=20 > Good idea. Sorry, I didn't see Mark's message because I'm away from the keyboard=20 these days and inactive on the list, and I don't know until when. >> The main difficulty here was that our SVG artwork is partially >> transparent, and includes a "Background" layer with a checker-board >> pattern. I guess this layer is for convenience when editing in >> Inkscape, and apparently Inkscape excludes the "Background" layer when >> exporting to png. Other tools render all layers. Therefore, avoiding >> Inkscape required code to remove that layer before conversion to png. >=20 > Fun. :-) >=20 > If possible, I would rather remove said layer directly in the > guix-artwork repo, or somehow make that layer invisible to > rsvg-convert. Luis Felipe: What=E2=80=99s your take on this? If I understand correctly, the problem is transparency, right? I don't=20 understand why transparency would be an issue when exporting PNG images,=20 but I don't know how rsvg works. In any case, the SVG has transparency in several parts: - The logo. - The checkerboard pattern (which is part of the design as in the slim=20 login screen). - The document/page background (inkscape:pageopacity=3D"0"). Modifying the first to be fully opaque is time consuming, but can be=20 done. The checkerboard transparency is used to blend the little squares with=20 the gradient of the dark rectangle bellow it. Making it opaque would=20 break the design. So the only option I see there is to remove it. The document background is what Inkscape refers to as "Background" when=20 you export the PNG image from the command line: $ inkscape -e test-4-3.png GuixSD-fully-black-4-3.svg Background RRGGBBAA: ffffff00 Area 0:0:1024:768 exported to 1024 x 768 pixels (90 dpi) Bitmap saved as: test-4-3.png Modifying the document background does not affect the design at all,=20 because we are using the dark rectangle on top of it as the background=20 of the image, so it doesn't matter what the background of the document=20 is. Could it be that rsvg-convert is complaining about transparency in the=20 page/document background and not about the transparency of the=20 checkerboard pattern in the "Background" layer? Because it is not=20 complaining about the transparency in the layer that contains the logo=20 (which has transparency as well), is it? If you want to try modifying only the document opacity, set=20 =C2=ABinkscape:pageopacity=3D"0"=C2=BB to 1. Graphically, this can be don= e from the=20 Document Properties window in Inkscape (Shift+Ctrl+D). But I bet you=20 already did that... :( --=20 Luis Felipe L=C3=B3pez Acevedo http://sirgazil.bitbucket.org/