Stream into System.Drawing.Image

From: Josema (Jestrade_at_ocu.org)
Date: 02/08/05


Date: Tue, 8 Feb 2005 06:23:05 -0800

Hi,

I get from database a field of type binary (its a gif image) into byte[]
until here no problem, cause i veryfied that the binary its stored into the
byte[] variable (called arrayb in my application).

Im trying show into Internet explorer this byte[] (arrayb its the name of
the variable) this way:

1) MemoryStream imgStream=new MemoryStream(arrayb,0,arrayb.Length, false,
true);
2) System.Drawing.Image tmpimg=System.Drawing.Image.FromStream(imgStream);

Question 1) Why im getting an error in the step 2 that says?: Invalid
parameter used.

Question 2) How could i show the image into a HtmlGenericControl?

-- 
Thanks a lot
Regards.
Josema