On Mon, 2010-08-23 at 14:14 +0100, Rampage wrote:
> -----------------------------------------------------------------------------
> string sOutput = StartProcess("cat", picture.png");
> byte[] imagebytes = System.Text.Encoding.Default.GetBytes(sOutput);
>
> Gdk.Pixbuf pb = new Gdk.PixBuf(imagebytes);
>
> Image img = new Image(pb);
> --------------------------------------------------------------------------------
>
> the program returns me with an exception saying that the file format for the
> pixbuf is not valid.Perhaps this? Process prc = new Process(); prc.StartInfo.UseShellExecute = false; prc.StartInfo.FileName = sProgram; prc.StartInfo.Arguments = sArguments; prc.StartInfo.RedirectStandardOutput = true; prc.Start(); bytes[] stdout = new byte[8192*1024]; int len = prc.StandardOutput.BaseStream.Read( stdout, 0, 8192*1024 ); Image img = new Image(stdout); Ian
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
