From daf29e174fb28b6eea329fb6765efaedfdaafbad Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 11 Sep 2021 17:02:41 -0400 Subject: [PATCH] Load jpegs without gdk-pixbuf Use our own loader for jpeg files. --- gdk/gdktexture.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c index 7d1907be8d..7a8a324e37 100644 --- a/gdk/gdktexture.c +++ b/gdk/gdktexture.c @@ -48,6 +48,7 @@ #include #include "loaders/gdkpngprivate.h" #include "loaders/gdktiffprivate.h" +#include "loaders/gdkjpegprivate.h" G_DEFINE_QUARK (gdk-texture-error-quark, gdk_texture_error) @@ -445,6 +446,11 @@ gdk_texture_new_from_bytes (GBytes *bytes, { return gdk_load_tiff (bytes, error); } + else if (size > strlen (JPEG_SIGNATURE) && + memcmp (data, JPEG_SIGNATURE, strlen (JPEG_SIGNATURE)) == 0) + { + return gdk_load_jpeg (bytes, error); + } else { GInputStream *stream;