diff --git a/gdk-pixbuf/gdk-pixbuf-core.h b/gdk-pixbuf/gdk-pixbuf-core.h
index b256380..9daec9f 100644
--- a/gdk-pixbuf/gdk-pixbuf-core.h
+++ b/gdk-pixbuf/gdk-pixbuf-core.h
@@ -140,6 +140,12 @@ GdkPixbuf *gdk_pixbuf_new_from_file_at_scale (const char *filename,
 					      gboolean    preserve_aspect_ratio,
 					      GError    **error);
 
+GdkPixbuf *
+gdk_pixbuf_new_from_buffer (const guchar  *buffer,
+                            gsize          length,
+                            const gchar*   mime_type,
+                            GError       **error);
+
 GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data,
 				     GdkColorspace colorspace,
 				     gboolean has_alpha,
diff --git a/gdk-pixbuf/gdk-pixbuf-data.c b/gdk-pixbuf/gdk-pixbuf-data.c
index 800d64d..3922f7c 100644
--- a/gdk-pixbuf/gdk-pixbuf-data.c
+++ b/gdk-pixbuf/gdk-pixbuf-data.c
@@ -27,7 +27,57 @@
 #include <stdlib.h>
 #include <string.h>
 
-
+/**
+ * gdk_pixbuf_new_from_buffer:
+ * @buffer: Buffer with image data
+ * @length: Length of the buffer
+ * @mime_type: a MIME type, or %NULL
+ * @error: return location for a #GError, or %NULL
+ *
+ * Creates a new #GdkPixbuf out of the specified buffer.
+ *
+ * You can specify a MIME type if looking at the buffer
+ * is not enough to determine the right type.
+ *
+ * Return value: A newly-allocated #GdkPixbuf
+ *
+ * Since: 2.16
+ **/
+GdkPixbuf *
+gdk_pixbuf_new_from_buffer (const guchar  *buffer,
+                            gsize          length,
+                            const gchar   *mime_type,
+                            GError       **error)
+{
+  GdkPixbufLoader *loader;
+  GdkPixbuf *pixbuf;
+
+  g_return_val_if_fail (buffer != NULL, NULL);
+  g_return_val_if_fail (length > 0, NULL);
+
+  if (mime_type)
+    {
+      loader = gdk_pixbuf_loader_new_with_mime_type (mime_type, error);
+      if (!loader)
+        return NULL;
+    }
+  else
+    loader = gdk_pixbuf_loader_new ();
+  if (!gdk_pixbuf_loader_write (loader, buffer, length, error))
+    {
+      g_object_unref (loader);
+      return NULL;
+    }
+  if (!gdk_pixbuf_loader_close (loader, error))
+    {
+      g_object_unref (loader);
+      return NULL;
+    }
+  pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+  g_object_ref (pixbuf);
+  g_object_unref (loader);
+  return pixbuf;
+}
 
 /**
  * gdk_pixbuf_new_from_data:
diff --git a/gdk-pixbuf/gdk-pixbuf.symbols b/gdk-pixbuf/gdk-pixbuf.symbols
index 4b579dd..45f83c8 100644
--- a/gdk-pixbuf/gdk-pixbuf.symbols
+++ b/gdk-pixbuf/gdk-pixbuf.symbols
@@ -37,6 +37,7 @@ gdk_pixbuf_fill
 
 #if IN_HEADER(GDK_PIXBUF_CORE_H)
 #if IN_FILE(__GDK_PIXBUF_DATA_C__)
+gdk_pixbuf_new_from_buffer
 gdk_pixbuf_new_from_data
 #endif
 #endif
