123456789101112131415161718192021222324 |
- using System.Drawing;
- using System.IO;
- namespace PaintDotNet
- {
- public sealed class PngFileType
- : InternalFileType
- {
- public PngFileType()
- : base("PNG", FileTypeFlags.SupportsLoading | FileTypeFlags.SupportsSaving, new string[] { ".png" })
- {
- }
- public override Document OnLoad(Stream input)
- {
- using (Image image = PdnResources.LoadImage(input))
- {
- Document document = Document.FromImage(image);
- return document;
- }
- }
- }
- }
|