diff --git a/Source/Libs/GdkSharp/GdkSharp.metadata b/Source/Libs/GdkSharp/GdkSharp.metadata
index 8d937d577..cf9a428eb 100644
--- a/Source/Libs/GdkSharp/GdkSharp.metadata
+++ b/Source/Libs/GdkSharp/GdkSharp.metadata
@@ -109,6 +109,8 @@
1
1
1
+ 1
+ 1
1
true
1
diff --git a/Source/Libs/GdkSharp/Pixbuf.cs b/Source/Libs/GdkSharp/Pixbuf.cs
index cba3df10a..7ca4b9f7a 100644
--- a/Source/Libs/GdkSharp/Pixbuf.cs
+++ b/Source/Libs/GdkSharp/Pixbuf.cs
@@ -374,5 +374,43 @@ namespace Gdk {
throw new GLib.GException (error);
return saved;
}
+
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ delegate bool d_gdk_pixbuf_save_to_stream(IntPtr raw, IntPtr stream, IntPtr type, IntPtr cancellable, out IntPtr error, IntPtr dummy);
+ static d_gdk_pixbuf_save_to_stream gdk_pixbuf_save_to_stream = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_stream"));
+
+ public unsafe bool SaveToStream(GLib.OutputStream stream, string type, GLib.Cancellable cancellable)
+ {
+ IntPtr error = IntPtr.Zero;
+ IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup(type);
+ bool ret = gdk_pixbuf_save_to_stream(Handle, stream == null ? IntPtr.Zero : stream.Handle, native_type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error, IntPtr.Zero);
+ GLib.Marshaller.Free(native_type);
+
+ if (error != IntPtr.Zero)
+ throw new GLib.GException(error);
+
+ return ret;
+ }
+
+ [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
+ delegate bool d_gdk_pixbuf_save_to_streamv(IntPtr raw, IntPtr stream, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, IntPtr cancellable, out IntPtr error);
+ static d_gdk_pixbuf_save_to_streamv gdk_pixbuf_save_to_streamv = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_streamv"));
+
+ public unsafe bool SaveToStreamv(GLib.OutputStream stream, string type, string[] option_keys, string[] option_values, GLib.Cancellable cancellable)
+ {
+ IntPtr error = IntPtr.Zero;
+ IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup(type);
+ IntPtr[] native_option_keys = NullTerm (option_keys);
+ IntPtr[] native_option_values = NullTerm (option_values);
+ bool ret = gdk_pixbuf_save_to_streamv(Handle, stream == null ? IntPtr.Zero : stream.Handle, native_type, native_option_keys, native_option_values, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
+ GLib.Marshaller.Free (native_type);
+ ReleaseArray (native_option_keys);
+ ReleaseArray (native_option_values);
+
+ if (error != IntPtr.Zero)
+ throw new GLib.GException (error);
+
+ return ret;
+ }
}
}