[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing items to make Cairo ready
From: |
Jean Abou Samra |
Subject: |
Re: Missing items to make Cairo ready |
Date: |
Mon, 2 Jan 2023 01:49:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 |
Le 02/01/2023 à 01:30, Luca Fascione a écrit :
On Sun, Jan 1, 2023 at 11:16 PM Jean Abou Samra <jean@abou-samra.fr>
wrote:
Its image operator doesn't have
support for transparency on some pixels and not others.
So you're worried about PS with embedded pixels coming from maybe a
PNG not roundtripping correctly back to PNG when transparency is involved?
And you're saying the reason users would do it this way is because
there is no support in lilypond for embedded pixel rasters except via EPS?
I don't understand all of what you are writing, but it doesn't look like
we're on the same page.
In !1787, I am adding a command \image, which can embed PNG files in
addition to EPS files. Unlike the state of the MR when this thread
began, this command now works in all ouput backends: PS, SVG, Cairo.
In the Cairo backend, the implementation lets Cairo read the pixels from
the PNG file into a memory buffer, and write that as image onto the
output surface.
In the SVG backend, the implementation embeds the image using an <image>
tag containing the image data as base64.
In the PS backend, it uses the PostScript 'image' operator with embedded
image data in hexadecimal (Cairo is actually used internally here to
parse the PNG file and write it as a stream that PostScript understands).
The problem with the PS backend implementation is that PostScript
doesn't have a way to embed images with alpha transparency.
Note that the Cairo backend *can* write PostScript files with
alpha-transparent PNGs, but that is because it understands the PNG image
and all of the other drawings. It transforms the alpha-transparent PNG
into a PNG without alpha transparency, by combining it with the other
elements on the page. LilyPond is not graphics software and cannot do
that. The PS backend delegates to Ghostscript as graphics software, and
Ghostscript does not have this ability.
It's not "users" who do the PNG → PS conversion, but LilyPond, internally.
OpenPGP_signature
Description: OpenPGP digital signature
Re: Missing items to make Cairo ready, Jean Abou Samra, 2023/01/01
Re: Missing items to make Cairo ready, Han-Wen Nienhuys, 2023/01/06
Re: Missing items to make Cairo ready, Han-Wen Nienhuys, 2023/01/04
- Re: Missing items to make Cairo ready, Jean Abou Samra, 2023/01/04
- Re: Missing items to make Cairo ready, Jonas Hahnfeld, 2023/01/04
- Re: Missing items to make Cairo ready, Jean Abou Samra, 2023/01/04
- Re: Missing items to make Cairo ready, Jonas Hahnfeld, 2023/01/04
- Re: Missing items to make Cairo ready, Jean Abou Samra, 2023/01/05
- Re: Missing items to make Cairo ready, Jean Abou Samra, 2023/01/06