[gthumb: 4/5] jxl: add magic to list and JPEG XL can have transparency




commit 5d057c7a698909bb824de9f89ed129a63334ba68
Author: Ian Tester <imroykun gmail com>
Date:   Sun Feb 28 04:21:17 2021 +1100

    jxl: add magic to list and JPEG XL can have transparency

 gthumb/glib-utils.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index 672faab6..39698375 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -1801,7 +1801,9 @@ get_mime_type_from_magic_numbers (guchar *buffer,
                { 0,  4, "II\x2a\x00",                          "image/tiff" },
                { 0,  4, "GIF8",                                "image/gif" },
                { 0,  3, "\xff\xd8\xff",                        "image/jpeg" },
-               { 8,  7, "WEBPVP8",                             "image/webp" }
+               { 8,  7, "WEBPVP8",                             "image/webp" },
+               { 0,  2, "\xff\x0a",                            "image/jxl" },
+               { 0, 12, "\x00\x00\x00\x0cJXL\x20\x0d\x0a\x87\x0a", "image/jxl" }
        };
 
        int  i;
@@ -1915,7 +1917,8 @@ _g_mime_type_has_transparency (const char *mime_type)
        return (strcmp (mime_type, "image/png") == 0)
                || (strcmp (mime_type, "image/gif") == 0)
                || (strcmp (mime_type, "image/svg+xml") == 0)
-               || (strcmp (mime_type, "image/webp") == 0);
+               || (strcmp (mime_type, "image/webp") == 0)
+               || (strcmp (mime_type, "image/jxl") == 0);
 }
 
 


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