Results 1 to 3 of 3

Thread: [RESOLVED] [2.0] Save an image?

  1. #1

    Thread Starter
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Resolved [RESOLVED] [2.0] Save an image?

    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?

  2. #2

    Thread Starter
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: [2.0] Save an image?

    Or I can stop being stupid and look at the methods for the Bitmap object... too easy.

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: [RESOLVED] [2.0] Save an image?

    Use the Save method of the bitmap object. You can pass in a filepath and specify the image format too. Something like this
    c# Code:
    1. if (SaveFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK) {
    2.                 canvas.Save(SaveFileDialog1.Filename, System.Drawing.Imaging.ImageFormat.Jpeg);
    3.             }

    Edit: Ooopssss.... You've already found the answer. Good job!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width