[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] system: grub: Convert grub background using rsvg-convert
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] system: grub: Convert grub background using rsvg-convert |
Date: |
Sat, 17 Oct 2015 15:17:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Andy Wingo <address@hidden> skribis:
> On Fri 28 Aug 2015 19:15, Luis Felipe López Acevedo <address@hidden> 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 in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] system: grub: Convert grub background using rsvg-convert,
Ludovic Courtès <=