Search results for 'Imaging'. 1 post(s) found.

  1. 2009/09/03 How to convert bitmap image to jpeg image ?
2009/09/03 09:12

How to convert bitmap image to jpeg image ?


C# provides easy interface to convert image.

Following is the simple example.

using System.Drawing.Imaging;

.
.
.

Image image = Image.FromFile("test.bmp");
image.Save("test.jpg", ImageFormat.Jpeg);

Above is PNG to jpeg. You can convert Jpeg to PNG as following.
using System.Drawing.Imaging;

.
.
.

Image image = Image.FromFile("test.jpeg");
image.Save("test.jpg", ImageFormat.Png);

Isn't it great ?
Trackback 0 Comment 0

Trackback : Cannot send a trackbact to this post.