using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class get_image : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // récupère la bitmap en cache
        Bitmap bmp = (Bitmap)Cache[Request.QueryString["name"]];
        if (bmp == null)
            return;

        Response.ClearContent();
        Response.AddHeader("Content-Type", "image/jpeg");
        bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
        Response.Flush();
    }
}