123456789101112131415161718192021222324252627282930 |
- using System.Drawing;
- using System.IO;
- namespace PaintDotNet
- {
- public sealed class GifFileType
- : InternalFileType
- {
- public enum PropertyNames
- {
- Threshold = 0,
- DitherLevel = 1
- }
- public GifFileType()
- : base("GIF", FileTypeFlags.SupportsLoading | FileTypeFlags.SupportsSaving | FileTypeFlags.SavesWithProgress, new string[] { ".gif" })
- {
- }
- public override Document OnLoad(Stream input)
- {
- using (Image image = PdnResources.LoadImage(input))
- {
- Document document = Document.FromImage(image);
- return document;
- }
- }
- }
- }
|