Bitmap.Save
Save(string)
Saves this Image to the specified file or stream.
public void Save(string filename)
| Parameter | Type | Description |
|---|
| filename | String | A string that contains the name of the file to which to save this Image. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | filename is null. |
| ExternalException | The image was saved with the wrong image format.-or- The image was saved to the same file it was created from. |
See Also
Save(string, ImageFormat)
Saves this Image to the specified file in the specified format.
public void Save(string filename, ImageFormat format)
| Parameter | Type | Description |
|---|
| filename | String | A string that contains the name of the file to which to save this Image. |
| format | ImageFormat | The ImageFormat for this Image. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | filename or format is null. |
| ExternalException | The image was saved with the wrong image format.-or- The image was saved to the same file it was created from. |
See Also
Save(Stream, ImageFormat)
Saves this image to the specified stream in the specified format.
public void Save(Stream stream, ImageFormat format)
| Parameter | Type | Description |
|---|
| stream | Stream | The Stream where the image will be saved. |
| format | ImageFormat | An ImageFormat that specifies the format of the saved image. |
Exceptions
| exception | condition |
|---|
| ArgumentNullException | stream or format is null. |
| ExternalException | The image was saved with the wrong image format |
See Also