BaconBuilder.Model.ImageManipulator.GetImageFormatInfo C# (CSharp) Method

GetImageFormatInfo() private method

Gets the file extension and System.Drawing.Imaging.ImageFormat associated with the selected format type.
private GetImageFormatInfo ( ImageType imageType ) : ImageFormat>.Tuple
imageType ImageType The format to get extension / format information for.
return ImageFormat>.Tuple
        private Tuple<string, ImageFormat> GetImageFormatInfo(ImageType imageType)
        {
            string extension;
            ImageFormat format;

            switch (imageType)
            {
                case ImageType.Bmp:
                    extension = ".bmp";
                    format = ImageFormat.Bmp;
                    break;
                case ImageType.Gif:
                    extension = ".gif";
                    format = ImageFormat.Gif;
                    break;
                case ImageType.Jpg:
                    extension = ".jpg";
                    format = ImageFormat.Jpeg;
                    break;
                case ImageType.Png:
                    extension = ".png";
                    format = ImageFormat.Png;
                    break;
                default:
                    extension = string.Empty;
                    format = ImageFormat.Png;
                    break;
            }

            var result = new Tuple<string, ImageFormat>(extension, format);

            return result;
        }