我之前询问了一种使用 visual basic 向图片添加水印的方法。感谢大家,我设法找到了一种方法,但现在似乎我需要一个代码来让用户选择图片上新水印位置的坐标。
这是我的代码
Dim Image1 As New Bitmap(OpenFileDialog1.FileName)
Dim Image2 As New Bitmap(PictureBox1.Image)
Dim Result As New Bitmap(Math.Max(Image1.Width, Image2.Width), _
Image1.Height + Image2.Height)
Dim gResult As Graphics = Graphics.FromImage(Result)
gResult.DrawImage(Image1, New Point(0, 0))
gResult.DrawImage(Image2, New Point(0, Image1.Height))
gResult.Dispose()
gResult = Nothing
PictureBox5.Image = Result