Home Notices Documents Classes Download Others Rice
Classes  >  bitmap  >  Save(string)
bitmap class : Save(string) method

Description

Stores the bitmap to the file.

Syntax

bitmapInstance.Save(string filePath)

Arguments

ClassNameDescription
stringfilePathA path of the file.

Return value

None.

Sample code

1:

bitmap bmp = new bitmap("http://rice.aki.gs/cookergx/img/someimage.png");

2:

bmp.Save("C:\Users\YourName\Documents\img\someimage.bmp");

Notes

It's a wrapper of the System.Drawing.Bitmap.Save(String, ImageFormat) method.

Supported format are the Bitmap, Gif, Jpeg, and Png.

The format is automatically determined from the file extension of the argument.

If the format can not determine from the file extension, an exception will be thrown. (FileFormatException)

Links for reference

Copyright © Rice All rights reserved.