using System.Drawing; using System.IO; namespace PaintDotNet { public sealed class BmpFileType : FileType { public BmpFileType() : base("BMP", FileTypeFlags.SupportsLoading | FileTypeFlags.SupportsSaving, new string[] { ".bmp" }) { } public enum PropertyNames { BitDepth = 0, DitherLevel = 1 } public enum BmpBitDepthUIChoices { AutoDetect = 0, Bpp24 = 1, Bpp8 = 2 } public override Document OnLoad(Stream input) { using (Image image = PdnResources.LoadImage(input)) { Document document = Document.FromImage(image); return document; } } } }