Can bitmap object be save as PNG or JPEG file format

Bitmap extends Image, therefore you can call: Image.Save (String, ImageFormat). For example:

using System.Drawing
// ...

Bitmap img = new Bitmap("file.jpg");
img.Save("file.png", ImageFormat.Png); // ImageFormat.Jpeg, etc

Omitting the second argument and just calling Image.Save(String) will save the image as its raw format.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)