Originariamente inviato da chipdb
Non ho il tuo codice sotto mano non posso inventarmelo... Se tipo hai
codice:
Dim image1 As Image
'qui fai tutti i pastrocchi sull'immagine e magari la metti nella picturebox
picImage.Image = image1
dovresti fare image1.Dispose() così a sentimento, non l'ho provato
continua ad andare in errore
allora da una form eseguo la manipolazione quando ho finito
codice:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
picTextured.Image.Save(Application.StartupPath + "\temp\1.jpg", Imaging.ImageFormat.Jpeg)
' Form1.picDemoArea.Image = picTextured.Image
picTextured.Image.Dispose()
picTxtr.Image.Dispose()
picBmp.Image.Dispose()
End Sub
dal form principale mi carico l'immagine eseguo un ulteriore modifica,
poi
codice:
Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
Try
picDemoArea.Image.Save(Application.StartupPath + "\images\" & Label3.Text, System.Drawing.Imaging.ImageFormat.Jpeg)
Catch ex As Exception
MessageBox.Show(ex.Message, "Errore", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Finally
My.Computer.FileSystem.DeleteDirectory(Application.StartupPath + "\temp", FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.CreateDirectory(Application.StartupPath + "\temp")
My.Computer.FileSystem.DeleteDirectory(Application.StartupPath + "\convert", FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.CreateDirectory(Application.StartupPath + "\convert")
End Try
End Sub
l'errore è sempre lo stesso