Click to See Complete Forum and Search --> : [RESOLVED] [2.0] Save an image?
timeshifter
Nov 27th, 2007, 11:46 AM
I have a Bitmap object within my app named canvas. How would I go about saving canvas as an image to the path specified by my SaveFileDialog?
timeshifter
Nov 27th, 2007, 01:05 PM
Or I can stop being stupid and look at the methods for the Bitmap object... too easy.
stanav
Nov 27th, 2007, 01:06 PM
Use the Save method of the bitmap object. You can pass in a filepath and specify the image format too. Something like this
if (SaveFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK) {
canvas.Save(SaveFileDialog1.Filename, System.Drawing.Imaging.ImageFormat.Jpeg);
}
Edit: Ooopssss.... You've already found the answer. Good job!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.