Response.WriteFile — Write out a byte stream

前端 未结 4 1038
一整个雨季
一整个雨季 2020-12-31 21:18

Is is possible to write to the http response stream from a dynamically created bitmap using the Response.Write/WriteFile without saving the image to the hard drive?

4条回答
  •  离开以前
    2020-12-31 22:05

    If you have your bitmap stored in a byte[] you can also dump that directly into Response.BinaryWrite(myByteArray);, as long as you have your content-type, length and disposition set correctly (as mentioned by @arx).

提交回复
热议问题