Transformando un System.Drawing.Image a un Gdk.Pixbuf
Martes, 24 Abril 2007
La receta es sencilla, y no conozco una forma más elegante de hacerlo. Si alguien tiene algún comentario, adelante.
CSharp:static Gdk.Pixbuf Image2Pixbuf( Image image ) {
using ( MemoryStream stream = new MemoryStream() )
{
image.Save( stream, System.Drawing.Imaging.ImageFormat.Png );
stream.Position = 0;
return new Gdk.Pixbuf( stream );
}
}
Si, me he puesto un [...]
