Berkil Posted October 15, 2009 Posted October 15, 2009 Is it possible to open a System.Drawing.Graphic Image in paint without having to save it first ?.. If not would it be possible to save the file temporarily, use it and then discard it again ? this code requires a specific file and can't take an Image created with Graphics: Process.Start("mspaint.exe"); Quote
Leaders snarfblam Posted October 15, 2009 Leaders Posted October 15, 2009 I doubt you can use paint to open the image without saving it first. When you create the temporary file and launch paint, you can handle the Process.Exited event so you know when paint has closed. If you want to delete the file, there is a certain way you will need to load it. Load the file into memory with File.ReadAllBytes, then create a memory stream on the array and pass it to Image.FromStream(). Image.FromFile() will keep the file open until it is disposed, so you wouldn't be able to delete it. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.