[PATCH v2 4/5] logo: Enable image format selection for the logo
Jules Maselbas
jmaselbas at kalray.eu
Thu Jan 20 02:38:00 PST 2022
On Thu, Jan 20, 2022 at 09:13:41AM +0100, Sascha Hauer wrote:
> On Mon, Jan 17, 2022 at 03:28:17PM -0800, Trent Piepho wrote:
> > On Mon, Jan 17, 2022 at 3:03 PM Jules Maselbas <jmaselbas at kalray.eu> wrote:
> > >
> > > +choice
> > > + prompt "Logo image encoding format to be used"
> > > + default BAREBOX_LOGO_PNG
> > > +
> > > +config BAREBOX_LOGO_PNG
> > > + bool "png"
> > > + select PNG
> > > + help
> > > + Encode logo with the PNG image format
> > > +
> > > +config BAREBOX_LOGO_BMP
> > > + bool "bmp"
> > > + select BMP
> > > + help
> > > + Encode logo with the BMP image format
> >
> > You might say why one might want one format or ther other. What's the
> > point of adding bmp support?
>
> The point could be that for a small logo a bmp image + renderer is
> smaller than a better compressed image + a bigger renderer. I don't know
> if that's actually the case though.
bmp images are ~3 times to ~25 times bigger than png, while qoi images
are at most twice as big as png images.
Using the sandbox config (target x86), the final binary, is compared to
using png:
- bmp: +1.31MB in total file size (~45%)
- qoi: +44.0KB in total file size (~1%)
roughly (+55KB from images, -10KB from .text/.rodata)
The intresting part is that qoi image can be futher compressed, using
lz4 or lzop, and have a file size very close (even smaller) than png
images (not further compressed).
best,
Jules
More information about the barebox
mailing list