Exemple #1
0
        public void SaveImageToFile(string filename, int compressionFactor = 80)
        {
            string      extension  = Path.GetExtension(filename);
            ImageFormat destFormat = ImageFormats.ExtensionToSystemFormat(extension);

            if (destFormat == null)
            {
                destFormat = fSystemImage.RawFormat;
                extension  = ImageFormats.SystemFormatToExtension(destFormat).ToLower();
                filename   = Path.ChangeExtension(filename, extension);
            }
            ImageTools.SaveImageToFile(fSystemImage, filename, destFormat, compressionFactor);
        }
Exemple #2
0
 public string GetImageExtension()
 {
     return(ImageFormats.SystemFormatToExtension(fSystemImage.RawFormat));
 }