On 2015-08-27 16:19, l...@gnu.org wrote:
Mark H Weaver <m...@netris.org> skribis:
This patch modifies 'svg->png' in (gnu system grub) to use
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.
Good idea.
Sorry, I didn't see Mark's message because I'm away from the keyboard
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.
Fun. :-)
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’s your take on this?
If I understand correctly, the problem is transparency, right? I don't
understand why transparency would be an issue when exporting PNG images,
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
login screen).
- The document/page background (inkscape:pageopacity="0").
Modifying the first to be fully opaque is time consuming, but can be
done.
The checkerboard transparency is used to blend the little squares with
the gradient of the dark rectangle bellow it. Making it opaque would
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
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,
because we are using the dark rectangle on top of it as the background
of the image, so it doesn't matter what the background of the document
is.
Could it be that rsvg-convert is complaining about transparency in the
page/document background and not about the transparency of the
checkerboard pattern in the "Background" layer? Because it is not
complaining about the transparency in the layer that contains the logo
(which has transparency as well), is it?
If you want to try modifying only the document opacity, set
«inkscape:pageopacity="0"» to 1. Graphically, this can be done from the
Document Properties window in Inkscape (Shift+Ctrl+D). But I bet you
already did that...
:(
--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/