public static void SetImageFormat(ref ImageFileFormat ziff, EImageFormat imgFormat) { switch (imgFormat) { case EImageFormat.BMP: ziff = new ImageFileFormatBmp(); break; case EImageFormat.GIF: ziff = new ImageFileFormatGif(); break; case EImageFormat.JPEG: ziff = new ImageFileFormatJpg(); break; case EImageFormat.PNG: ziff = new ImageFileFormatPng(); break; case EImageFormat.TIFF: ziff = new ImageFileFormatTif(); break; } }
public SaveImageToMemoryStreamOptions(Image img, ImageFileFormat iff) { this.MyImage = img; this.MyImageFileFormat = iff; }