2013-03-07 30 views
1

您好我想顯示的圖像,創造動態使用GDI + 這是我的代碼問題與OutputStream的

Font font = new Font("Impact", 20, FontStyle.Regular); 
    Bitmap image = new Bitmap(300,50); 
    Graphics g = Graphics.FromImage(image); 
    g.DrawString("This is a test", font, Brushes.Blue,10,5); 
    image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif); 
    g.Dispose(); 
    image.Dispose(); 

問題是,當我使用的是Firefox的輸出是這樣的:

enter image description here

但在IE瀏覽器中顯示正確(未在任何其他瀏覽器中測試)。什麼是錯誤。?

+0

顯示使用的代碼在你的default.aspx.cs – Blachshma 2013-03-07 09:06:02

+0

頁它只是在Page_Load事件 – Rakesh 2013-03-07 09:10:04

回答