如何从添加标签的PictureBox保存图像?

时间:2016-03-01 08:34:11

标签: c# winforms

我在我加载的图片框中添加了一个标签控件:

public void addTemp(int x, int y, string name)
{
    Label tempLbl = new Label();
    tempLbl.Location = new Point(x, y);
    tempLbl.BackColor = Color.Transparent;
    tempLbl.ForeColor = Color.WhiteSmoke;
    tempLbl.Font = new Font("Arial", 10, FontStyle.Bold);
    tempLbl.AutoSize = true;

    tempLbl.Text = "P" + name;
    pictureBox1.Controls.Add(tempLbl);
}

如何用我的标签保存这张照片?我试过这个并不起作用:

  pictureBox1.Image.Save(window.save_Patch + "\\" + "test.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg);

0 个答案:

没有答案