lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding images into a score created with -dbackend=svg


From: Valentin Petzel
Subject: Re: Embedding images into a score created with -dbackend=svg
Date: Fri, 26 Nov 2021 19:18:42 +0100

Hello Paolo,

I’m not exactly sure what you mean by „inline-svg”. The discussion you linked 
to is about manually converting svg paths into lilypond paths. While this is 
possible it surely would get very complicated with more advanced svg.

But it should be quite easy to use the <image>-tag svg gives us by it’s 
specifications to embed any sort of jpeg, png or svg image.

It should technically be possible to take the contents of one svg file 
directly into another file, but I don’t think this would be very stable, as we 
then can easily get things like clashing ids and stuff. So that probably is 
not a particularly good option.

Note that when using <image> we can directly embed the image data in base64 
encoded form.

Cheers,
Valentin

Am Freitag, 26. November 2021, 17:27:48 CET schrieb Paolo Prete:
> Hello Valentin,
> 
> > The proper solution would probably to add a function like \embed-image
> > which
> > makes use of the SVG <image> tag. But that one only specifies jpeg, png
> > and
> > svg. This means that for any other format it is the choice of the viewing
> > software if they want to support it.
> 
> this is why IMHO, for svg backend it would be even better to have a
> function that adds inline svg.
> IIRC there was, in this ml, an attempt to create it, but I can't find the
> corresponding message.
> Anyway, I would like to avoid conversions and, at the current state of art,
> I think that a way to  work-around is to draw a rect with the img size, and
> replace it with inline svg through some external utility.
> 
> Best,
> Paolo

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]