[gtk/image-loading: 6/14] Load tiffs without gdk-pixbuf
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/image-loading: 6/14] Load tiffs without gdk-pixbuf
- Date: Mon, 13 Sep 2021 03:47:10 +0000 (UTC)
commit 9ed4ee57637ed6b0d09b481a54f4b61988eb8c9a
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 11 16:30:37 2021 -0400
Load tiffs without gdk-pixbuf
This will let us load floating point data, in
the future.
gdk/gdktexture.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c
index a0e7d7121f..1b6be445f2 100644
--- a/gdk/gdktexture.c
+++ b/gdk/gdktexture.c
@@ -47,6 +47,7 @@
#include <graphene.h>
#include "loaders/gdkpngprivate.h"
+#include "loaders/gdktiffprivate.h"
/* HACK: So we don't need to include any (not-yet-created) GSK or GTK headers */
void
@@ -399,6 +400,9 @@ gdk_texture_new_from_file (GFile *file,
if (memcmp (data, PNG_SIGNATURE, strlen (PNG_SIGNATURE)) == 0)
texture = gdk_load_png (bytes, error);
+ else if (memcmp (data, TIFF_SIGNATURE1, strlen (TIFF_SIGNATURE1)) == 0 ||
+ memcmp (data, TIFF_SIGNATURE2, strlen (TIFF_SIGNATURE2)) == 0)
+ texture = gdk_load_tiff (bytes, error);
else
{
GInputStream *stream = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]