From 43a82f120412fefae232713fd820236c2d2e5320 Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Tue, 18 May 2004 19:07:15 +0000 Subject: [PATCH] 2004-05-18 Vladimir Vukicevic * gdk/Pixbuf.custom: Changed Pixbuf.Pixels to return an IntPtr instead diff --git a/gnome/Print.custom b/gnome/Print.custom index c72527386..05297970e 100644 --- a/gnome/Print.custom +++ b/gnome/Print.custom @@ -16,10 +16,12 @@ public static int Pixbuf (Gnome.PrintContext pc, Gdk.Pixbuf image) { int ret = 0; - if (image.NChannels == 4) - ret = gnome_print_rgbaimage(pc.Handle, image.Pixels, image.Width, image.Height, image.Rowstride); - else - ret = gnome_print_rgbimage(pc.Handle, image.Pixels, image.Width, image.Height, image.Rowstride); + unsafe { + if (image.NChannels == 4) + ret = gnome_print_rgbaimage(pc.Handle, (byte *) image.Pixels, image.Width, image.Height, image.Rowstride); + else + ret = gnome_print_rgbimage(pc.Handle, (byte *) image.Pixels, image.Width, image.Height, image.Rowstride); + } return ret; }