mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Load jpegs without gdk-pixbuf
Use our own loader for jpeg files.
This commit is contained in:
parent
729ba8111a
commit
daf29e174f
@ -48,6 +48,7 @@
|
||||
#include <graphene.h>
|
||||
#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;
|
||||
|
Loading…
Reference in New Issue
Block a user