Click to See Complete Forum and Search --> : Question regarding DrawImage function


eloberg
January 24th, 2003, 08:49 AM
I have a byte array with grey lavel values which I want to write out on the screen using preferably the DrawImage function, since this function takes Image and Rectangle as parameters. Is there a way in which I can use this function for writing out my byte array data to screen?
How should I bring the byte array data into an Image object? Is it at all possible or do I have to use a completely different method?
When doing the same in VC++ I simply used the DrawDibDraw function, but this option is not available in C# (or so I think).

pareshgh
January 24th, 2003, 04:11 PM
you can use
Image.FromStream
method . if you have a file then there is a Image.FromFile option. if you have a bytes then you can convert it thru stream and then use it or you could use Memorystream also...

hope this works for you,
if this doesn't solve for you then
visit

GOTDOTNET (http://www.gotdotnet.com/Community/MessageBoard/MessageBoard.aspx?ID=6)

Paresh