freetype-devel
[Top][All Lists]
Advanced

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

Re: serving compressed images


From: David Turner
Subject: Re: serving compressed images
Date: Sun, 20 Feb 2022 22:49:28 +0100



Le jeu. 10 févr. 2022 à 05:32, Alexei Podtelezhnikov <apodtele@gmail.com> a écrit :
Hi All,

As Werner is working on improving the SBIX table support
(https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/139),
a topic of compressed images came up. Right now, FreeType depends on
libpng to uncompress PNG, but SBIX can have TIFF and JPEG. So I was
wondering if we should even bother uncompressing those. FreeType could
just serve compressed data. With SBIX, FreeType could still match the
best strike to the requested size but then just deliver
FT_GLYPH_FORMAT_IMAGE with a tag, some minimal metadata, and raw bytes
under FT_GlyphSlot->other.

This would be quite similar to the SVG plans currently slated for the
next release, i.e., we delegate uncompressing and rendering to a
client.

Is there interest in such a feature?

I agree that I don't see much use for JPEG and TIFF decoding in the library itself,
It might be convenient for a client to provide an optional function to decode those with its decoding library of choice, and have FreeType return the bitmap data obtained so far, since this would simplify code paths.
As usual, it is important to avoid introducing too much complexity in the API or implementation related to pixel color formats, data layouts, and memory allocation / release.

At first, just returning the raw bytes is a perfectly valid option.
 
Thanks,
Alexei


reply via email to

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