This is a migrated thread and some comments may be shown as answers.

Picturebox Invalid Data Error

0 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Donta
Top achievements
Rank 1
Donta asked on 27 Jan 2012, 03:48 PM
I have a blob image stored in a mySql database. I can render the image just fine via an ahsx handler to display on my webpages using the code:
context.Response.ContentType = "image/jpeg";
byte[] img = businessProvider.GetImage(Convert.ToInt32(id));
context.Response.BinaryWrite(img);
context.Response.End();

I'm also wanting to display the image on a telerik report. I've set the value of the picturebox to the byte[] property on the business object and set the mimetype to "image/jpeg"; When i run the report the picturebox displays an error that reads "invalid image data".

Any ideas what to look for?

Thanks, Donta

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Donta
Top achievements
Rank 1
Share this question
or