locked
BitMap Problem RRS feed

  • Question

  • User358219120 posted

    Hello All,

    i have created a 2d line chart and it displays on the aspx page when i put this in the page_load method

    bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);

     

    but when i put this line in another method and call it, it simply just prints out all the bytecodes 

    GIF89av????????????????????3f?̀?333f3?3̀3?f3fff?f̀f??3?f???̀??̳̦̙̌̿?3????333f3?3̳?33333f33?33̳3?3f33ff3f?3f̳f?3?33?f3??3?̳??3̳3̦3̙3̌3̿3?33??3??f3fff?f̦?f33f3ff3?f3̦3?ff3fffff?ff̦f?f?3f?ff??f?̦??f̳f̦f̙f̌f̿f?3f??f???3?f???̙??33?3f?3??3̙3??f3?ff?f??f̙f???3??f?????

    does anyone know how to fix this??

     

    thanks agaun

    Friday, February 17, 2006 4:27 PM

All replies

  • User-1372641848 posted

    You probably need to set correct content type for your image. and remove other things from response using Response.Clear and Response.End

    Response.Clear();

    Response.ContentType = "image/pjpeg";

    bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);

    Response.End()

    Sunday, February 19, 2006 12:21 PM