/// <summary> /// The save image. /// </summary> /// <param name="bmp"> /// The bmp. /// </param> /// <param name="fileName"> /// The file name. /// </param> /// <param name="imageFormat"> /// The image format. /// </param> private void SaveImage(Bitmap bmp, string fileName, ImageFormat imageFormat) { if (Equals(imageFormat, ImageFormat.Icon)) { var nikseBitmap = new NikseBitmap(bmp); nikseBitmap.SaveAsTarga(fileName); } else { bmp.Save(fileName, imageFormat); } }