Parameter not valid
-
HI, I am fecthing varbinary data from data base and converting it to Image data. i got error of 'Parameter is not valid' i use this code
System.Drawing.Image img; byte[] photobyte = (byte[])dtPhoto.Rows[0][0]; using (MemoryStream stream = new MemoryStream((byte[])dtPhoto.Rows[0][0])) { img = System.Drawing.Image.FromStream(stream); // here i gor error img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); }
ThanksViral YahooID : just_viral My Site : www.theseoworld.info
-
HI, I am fecthing varbinary data from data base and converting it to Image data. i got error of 'Parameter is not valid' i use this code
System.Drawing.Image img; byte[] photobyte = (byte[])dtPhoto.Rows[0][0]; using (MemoryStream stream = new MemoryStream((byte[])dtPhoto.Rows[0][0])) { img = System.Drawing.Image.FromStream(stream); // here i gor error img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); }
ThanksViral YahooID : just_viral My Site : www.theseoworld.info
-
Hi ben i use Response.OutputStream for display image on Page. thanks for reply...
Viral YahooID : just_viral My Site : www.theseoworld.info
-
HI, I am fecthing varbinary data from data base and converting it to Image data. i got error of 'Parameter is not valid' i use this code
System.Drawing.Image img; byte[] photobyte = (byte[])dtPhoto.Rows[0][0]; using (MemoryStream stream = new MemoryStream((byte[])dtPhoto.Rows[0][0])) { img = System.Drawing.Image.FromStream(stream); // here i gor error img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); }
ThanksViral YahooID : just_viral My Site : www.theseoworld.info
-
Are you trying to change the file format of the image, or why are you loading and saving the image? If you just want to send the image to the browser, don't use any Image object, just send the bytes.
--- single minded; short sighted; long gone;
Well i try it too but dont work can please tell me how to send the byte?? thanks for your reply..
Viral YahooID : just_viral My Site : www.theseoworld.info
-
Well i try it too but dont work can please tell me how to send the byte?? thanks for your reply..
Viral YahooID : just_viral My Site : www.theseoworld.info