아래와 같이 간단하게 할 수 있습니다.
if (5 == args.Length) { string sInutFilePath = args[0]; string sOutputFilePath = args[1]; int iRed = Convert.ToInt32(args[2]); int iGreen = Convert.ToInt32(args[3]); int iBlue = Convert.ToInt32(args[4]); Bitmap bmp = Image.FromFile(sInutFilePath) as Bitmap; bmp.MakeTransparent(Color.FromArgb(iRed, iGreen, iBlue)); bmp.Save(sOutputFilePath, ImageFormat.Bmp); } else { Console.WriteLine("Usage: png2bmp32 "); }
댓글
댓글 쓰기