public void ProcessRequest(HttpContext context) { byte r = QueryString.GetByte("r"); byte g = QueryString.GetByte("g"); byte b = QueryString.GetByte("b"); int w = QueryString.GetInt("w"); int h = QueryString.GetInt("h"); SetReusables(context); Image sqrImg = _cs.Get(r, g, b, w, h); context.Response.StatusCode = 200; context.Response.ContentType = "image/png"; MemoryStream ms = new MemoryStream(); sqrImg.Save(ms, ImageFormat.Png); ms.WriteTo(context.Response.OutputStream); context.Response.Flush(); }