在Crystal报表中显示图像时,背景文本为黑色

时间:2017-10-17 19:57:38

标签: c# css vb.net image crystal-reports

我在将图片保存到我的电脑后用VB.NET在图片上写文字很好但我在Crystal报表背景文本中显示图片的问题是黑色 我想要背景白色写作

  On Error Resume Next
    My.Computer.FileSystem.DeleteFile(DbPath + "\Pictures\" + "orign" + ".jpg")
    PictureBox2.Image.Save(DbPath + "\Pictures\" + "orign" + ".jpg", Imaging.ImageFormat.Jpeg)
    'End If
    Dim bmp = Bitmap.FromFile(DbPath + "\Pictures\" + "orign" + ".jpg")

    Dim newImage = New Bitmap(bmp.Width, bmp.Height + 40)

    Dim gr = Graphics.FromImage(newImage)
    gr.DrawImageUnscaled(bmp, 0, 0)
    gr.DrawString(MigraID.Text & Space(2) & MigraName.Text & Space(2) & IqamaNum.Text & Space(2) & DatePicH.Text,
     New Font("Tahoma", 22),
    Brushes.Black, New RectangleF(0, bmp.Height, bmp.Width, 50))


    newImage.Save(DbPath + "\Pictures\" + MigraID.Text + ".jpg")

    PictureBox2.Image = Image.FromFile(DbPath + "\Pictures\" + MigraID.Text + ".jpg")[![enter image description here][1]][1]

1 个答案:

答案 0 :(得分:0)

我找到了解决问题的方法

gr.Clear(Color.White)