[cairo] Load a Bitmap in ImageSurface

Saeed shahbazi saeed.shahbazi at gmail.com
Mon Oct 14 02:38:12 CEST 2013


Hi all,

I'm using Mono and .Net 2 and I want to load a System.Drawing.Image image
to ImageSurface. All my efforts led to fuzzy images but the one as follows:
const string TmpFileName = "cairo_tmp.png";
image.Save(TmpFileName, ImageFormat.Png);
var imageSurface = new ImageSurface(TmpFileName);
imageSurface.Show(this.m_internalContext, x, y);
imageSurface.Destroy();

However, I don't want to write it to disk and load it again. Is there any
other solution?

Cheers,
S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20131014/76e4fef1/attachment.html>


More information about the cairo mailing list