For iW As Integer = 0 To SizeW - 1
For iH As Integer = 0 To SizeH - 1 '以宽为基本
'MsgBox(SizeW - 1) '''''''''''
okColor = imgok.GetPixel(iW, iH)
newBitmp.SetPixel(iW, iH, okColor)
Next
Next
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Me.PictureBox1.Image = imgok
Me.PictureBox1.Refresh()
' imgok.Save(Me.TextBox2.Text & "\PIC_" & i & ".jpg")
Try
newBitmp.Save(Me.TextBox2.Text & "\PIC_" & i & ".jpg")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End If
End If
End If
i += 1
ProgressBar1.Value += 20
If ProgressBar1.Value >= 100 Then
ProgressBar1.Value = 0
End If
Next
MsgBox("完成")
System.Diagnostics.Process.Start(TextBox2.Text)
ProgressBar1.Value = 0
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextBox1.Text = System.Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)