diff options
author | Jules Maselbas <jmaselbas@kalray.eu> | 2022-01-18 00:02:35 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-01-20 09:14:39 +0100 |
commit | 53c80f2365209823fd833253aac5ca69309f36af (patch) | |
tree | ea6175ba5f915b74008da30f683520160fe865ec /lib | |
parent | cad82010e259d419c24679267c43990abd7b7482 (diff) | |
download | barebox-53c80f2365209823fd833253aac5ca69309f36af.tar.gz |
logo: Add choice for the QOI image format option
Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
Link: https://lore.barebox.org/20220117230235.13549-6-jmaselbas@kalray.eu
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/logo/Kconfig | 7 | ||||
-rw-r--r-- | lib/logo/Makefile | 14 | ||||
-rw-r--r-- | lib/logo/logo.c | 2 |
3 files changed, 22 insertions, 1 deletions
diff --git a/lib/logo/Kconfig b/lib/logo/Kconfig index 64ba0e11e6..de3494eccf 100644 --- a/lib/logo/Kconfig +++ b/lib/logo/Kconfig @@ -25,6 +25,13 @@ config BAREBOX_LOGO_BMP help Encode logo with the BMP image format +config BAREBOX_LOGO_QOI + bool "qoi" + select QOI + select QOICONV + help + Encode logo with the QOI image format + endchoice config BAREBOX_LOGO_64 diff --git a/lib/logo/Makefile b/lib/logo/Makefile index 4829151fd6..d076a19a76 100644 --- a/lib/logo/Makefile +++ b/lib/logo/Makefile @@ -52,6 +52,12 @@ extra-y += $(patsubst %,%.bmp,$(bblogo-y)) %.bblogo: %.bmp FORCE $(call if_changed,logo) endif +ifdef CONFIG_BAREBOX_LOGO_QOI +extra-y += $(patsubst %,%.png,$(bblogo-y)) +extra-y += $(patsubst %,%.qoi,$(bblogo-y)) +%.bblogo: %.qoi FORCE + $(call if_changed,logo) +endif CONVERTOPTS += -background none @@ -67,4 +73,10 @@ quiet_cmd_png = PNG $@ %.png: $(srctree)/Documentation/barebox.svg FORCE $(call if_changed,png) -clean-files += *.png *.bmp *.bblogo *.bblogo.S +quiet_cmd_qoi = QOI $@ + cmd_qoi = $(objtree)/scripts/qoiconv $< $@ + +%.qoi: %.png FORCE + $(call if_changed,qoi) + +clean-files += *.png *.qoi *.bmp *.bblogo *.bblogo.S diff --git a/lib/logo/logo.c b/lib/logo/logo.c index 200eb992b3..a64f489939 100644 --- a/lib/logo/logo.c +++ b/lib/logo/logo.c @@ -38,6 +38,8 @@ static void load_logo(int width, void *start, void *end) ext = "png"; else if (IS_ENABLED(CONFIG_BAREBOX_LOGO_BMP)) ext = "bmp"; + else if (IS_ENABLED(CONFIG_BAREBOX_LOGO_QOI)) + ext = "qoi"; filename = basprintf("/logo/barebox-logo-%d.%s", width, ext); write_file(filename, start, size); |