PNG/JPG変換 by C#

ブログに新着記事

PNG/JPG変換 by C#

が投稿されました。
良いかどうかわからないが、PNG/JPG変換 by C#

{
Image img = Image.FromFile(path);
if (img.RawFormat == ImageFormat.Png)
{
path = Path.ChangeExtension(path, “jpg”); // path + “.jpg”;
img.Save(path, ImageFormat.Jpeg);
}
img.Dispose();
img = null;
}

 

Both comments and pings are currently closed.

Comments are closed.

Subscribe to RSS Feed Follow me on Twitter!