Brilliant piece of code - and is far faster than a standard aspx page
If a suggestion is in order - a trap to see if a value is returned and if not, to show a blank image ( thus not showing the broken image link
if (pict.Length > 0){
ctx.Response.ContentType = "image/jpeg";
ctx.Response.OutputStream.Write(pict,0,pict.Length);
}
else {
Image pict2 = Image.FromFile("C:\\somedirectory\\blankimage.gif");
ctx.Response.ContentType="image/jpeg";
pict2.Save(ctx.Response.OutputStream,System.Drawing.Imaging.ImageFormat.Jpeg);
}
This however bombs out on pict.Length if no id is supplied - any suggestions ??