From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org,
"Luis Felipe López Acevedo" <felipe.lopez@openmailbox.org>
Subject: Re: [PATCH] system: grub: Convert grub background using rsvg-convert
Date: Sat, 17 Oct 2015 15:17:51 +0200 [thread overview]
Message-ID: <87d1wdljls.fsf@gnu.org> (raw)
In-Reply-To: <87zj17vnrm.fsf@igalia.com> (Andy Wingo's message of "Mon, 31 Aug 2015 10:57:17 +0200")
Andy Wingo <wingo@igalia.com> skribis:
> On Fri 28 Aug 2015 19:15, Luis Felipe López Acevedo <felipe.lopez@openmailbox.org> writes:
>
>> 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?
>
> We could use guile-cairo / guile-rsvg to convert, fwiw. Better to do
> that than to cause our graphics people to modify the image.
>
> (use-modules (rsvg) (cairo))
>
> (define (->int x) (inexact->exact (ceiling x)))
>
> (define (render-to-png in-svg out-png)
> (let ((svg (rsvg-handle-new-from-file in-svg)))
> (call-with-values (lambda () (rsvg-handle-get-dimensions svg))
> (lambda (width height em ex)
> (let* ((surf (cairo-image-surface-create 'argb32
> (->int width)
> (->int height)))
> (cr (cairo-create surf)))
> (rsvg-handle-render-cairo svg cr)
> (cairo-surface-flush surf)
> (cairo-surface-write-to-png (cairo-get-target cr) out-png))))))
FWIW I tried this (finally!) and this has the same problem as
‘rsvg-convert’ regarding the checkerboard pattern.
So maybe we need to apply Felipe’s changes anyway? Thoughts?
Ludo’.
prev parent reply other threads:[~2015-10-17 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-23 18:23 [PATCH] system: grub: Convert grub background using rsvg-convert Mark H Weaver
2015-08-27 21:19 ` Ludovic Courtès
2015-08-28 17:15 ` Luis Felipe López Acevedo
2015-08-28 18:24 ` Mark H Weaver
2015-08-28 22:38 ` Luis Felipe López Acevedo
2015-08-29 13:55 ` Luis Felipe López Acevedo
2015-08-31 8:57 ` Andy Wingo
2015-08-31 21:05 ` Ludovic Courtès
2015-10-17 13:17 ` Ludovic Courtès [this message]
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=87d1wdljls.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=felipe.lopez@openmailbox.org \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.com \
/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.