mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Jules Maselbas <jmaselbas@kalray.eu>, barebox@lists.infradead.org
Subject: Re: [PATCH 1/5] filetype: Add QOI format image type
Date: Fri, 14 Jan 2022 10:00:31 +0100	[thread overview]
Message-ID: <7fba581c-019e-7e51-29e9-ce75e60e5945@pengutronix.de> (raw)
In-Reply-To: <20220110221255.5003-2-jmaselbas@kalray.eu>

On 10.01.22 23:12, Jules Maselbas wrote:
> QOI image format is a "Quite OK" image format, it's simplicity is it's
> strength and could be a good replacement of bmp, maybe even for png.
> 
> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  common/filetype.c  | 3 +++
>  include/filetype.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/common/filetype.c b/common/filetype.c
> index 8ffcd6adcd..e5245668e2 100644
> --- a/common/filetype.c
> +++ b/common/filetype.c
> @@ -45,6 +45,7 @@ static const struct filetype_str filetype_str[] = {
>  	[filetype_mbr] = { "MBR sector", "mbr" },
>  	[filetype_bmp] = { "BMP image", "bmp" },
>  	[filetype_png] = { "PNG image", "png" },
> +	[filetype_qoi] = { "QOI image", "qoi" },
>  	[filetype_ext] = { "EXT filesystem", "ext" },
>  	[filetype_gpt] = { "GUID Partition Table", "gpt" },
>  	[filetype_ubifs] = { "UBIFS image", "ubifs" },
> @@ -300,6 +301,8 @@ enum filetype file_detect_type(const void *_buf, size_t bufsize)
>  		return filetype_aimage;
>  	if (buf64[0] == le64_to_cpu(0x0a1a0a0d474e5089ull))
>  		return filetype_png;
> +	if (strncmp(buf8, "qoif", 4) == 0)
> +		return filetype_qoi;
>  	if (is_barebox_mips_head(_buf))
>  		return filetype_mips_barebox;
>  	if (buf[0] == be32_to_cpu(0x534F4659))
> diff --git a/include/filetype.h b/include/filetype.h
> index 2640847e1f..8bc179ac08 100644
> --- a/include/filetype.h
> +++ b/include/filetype.h
> @@ -28,6 +28,7 @@ enum filetype {
>  	filetype_mbr,
>  	filetype_bmp,
>  	filetype_png,
> +	filetype_qoi,
>  	filetype_ext,
>  	filetype_gpt,
>  	filetype_ubifs,
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-01-14  9:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 22:12 [PATCH 0/5] Add support for QOI image format Jules Maselbas
2022-01-10 22:12 ` [PATCH 1/5] filetype: Add QOI format image type Jules Maselbas
2022-01-14  9:00   ` Ahmad Fatoum [this message]
2022-01-10 22:12 ` [PATCH 2/5] gui: Add qoi image format Jules Maselbas
2022-01-14 10:05   ` Ahmad Fatoum
2022-01-14 10:54     ` Jules Maselbas
2022-01-10 22:12 ` [PATCH 3/5] scripts: Add qoiconv to convert png to qoi Jules Maselbas
2022-01-14 10:29   ` Ahmad Fatoum
2022-01-14 11:14     ` Jules Maselbas
2022-01-17 11:48       ` Ahmad Fatoum
2022-01-10 22:12 ` [PATCH 4/5] logo: Enable image format selection for the logo Jules Maselbas
2022-01-10 22:12 ` [PATCH 5/5] logo: Add choice for the QOI image format option Jules Maselbas
2022-01-14 10:28 ` [PATCH 0/5] Add support for QOI image format Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7fba581c-019e-7e51-29e9-ce75e60e5945@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jmaselbas@kalray.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox