我以图片为背景,在图片上画文字,但是最后在浏览器上显示的图片有小空隙,打印预览时图片上呈现许多小方格,这样打印的图片质量不好,请问各位这个该怎么解决。多谢!
此处为我的代码:
         Bitmap bitmap = new Bitmap(Server.MapPath("image/copy.jpg"));
        Graphics g = Graphics.FromImage(bitmap);
        try
        {
            Bitmap bitName = new Bitmap(Server.MapPath("image/32.JPG"));
            g.DrawImage(bitName, 6, 416, 220, 72);
            g.DrawString("1995年08月20日", new Font("宋体", 7,FontStyle.Bold), new SolidBrush(Color.Black), new PointF(380, 84));
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
            Response.ClearContent();
            Response.ContentType = "image/Gif";
            Response.BinaryWrite(ms.ToArray());
            ms.Close();
            ms.Dispose();
        }
        catch (Exception ex)
        {
            ex.Message.ToString();
        }
        finally
        {
            
            bitmap.Dispose();
            g.Dispose();
        }