为了学习图片的旋转,我在百度上收到了下面的代码:https://blog.csdn.net/UruseiBest/article/details/72582400
仿照此代码,我设计了窗体(需解压)
运行时出错,好像变量都定义了仍 然报错,请指正
此主题相关图片如下:出错.jpg
此处的代码如下:
Dim picSource As WinForm.PictureBox = e.Form.Controls("picSource")
Dim picDest As WinForm.PictureBox = e.Form.Controls("picDest")
Dim sourceImg As Bitmap
sourceImg = new Bitmap("D:\蒋安\蒋安个人资料\督导组财务\ddzcw2020\ddzcw\image")
picSource.Image = sourceImg
Dim destImg As Bitmap
destImg = sourceImg.Clone
Dim cbRotateFlip As WinForm.ComboBox = e.Form.Controls("cbRotateFlip")
Select Case cbRotateFlip.Text
Case "Rotate180FlipX"
destImg.RotateFlip(RotateFlipType.Rotate180FlipX)
Case "Rotate180FlipNone"
destImg.RotateFlip(RotateFlipType.Rotate180FlipNone)
Case "Rotate180FlipXY"
destImg.RotateFlip(RotateFlipType.Rotate180FlipXY)
End Select
picDest.Image = destImg