mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
Load tiffs without gdk-pixbuf
This will let us load floating point data, in the future.
This commit is contained in:
parent
a03594df52
commit
f925e12e1d
@ -47,6 +47,7 @@
|
|||||||
|
|
||||||
#include <graphene.h>
|
#include <graphene.h>
|
||||||
#include "loaders/gdkpngprivate.h"
|
#include "loaders/gdkpngprivate.h"
|
||||||
|
#include "loaders/gdktiffprivate.h"
|
||||||
|
|
||||||
G_DEFINE_QUARK (gdk-texture-error-quark, gdk_texture_error)
|
G_DEFINE_QUARK (gdk-texture-error-quark, gdk_texture_error)
|
||||||
|
|
||||||
@ -437,6 +438,13 @@ gdk_texture_new_from_bytes (GBytes *bytes,
|
|||||||
{
|
{
|
||||||
return gdk_load_png (bytes, error);
|
return gdk_load_png (bytes, error);
|
||||||
}
|
}
|
||||||
|
else if ((size > strlen (TIFF_SIGNATURE1) &&
|
||||||
|
memcmp (data, TIFF_SIGNATURE1, strlen (TIFF_SIGNATURE1)) == 0) ||
|
||||||
|
(size > strlen (TIFF_SIGNATURE2) &&
|
||||||
|
memcmp (data, TIFF_SIGNATURE2, strlen (TIFF_SIGNATURE2)) == 0))
|
||||||
|
{
|
||||||
|
return gdk_load_tiff (bytes, error);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GInputStream *stream;
|
GInputStream *stream;
|
||||||
|
Loading…
Reference in New Issue
Block a user