123456789101112131415161718192021222324252627 |
- using System.Drawing;
- using System.IO;
- namespace PaintDotNet
- {
- public sealed class JpegFileType : FileType
- {
- public JpegFileType()
- : base("JPEG", FileTypeFlags.SupportsLoading | FileTypeFlags.SupportsSaving, new string[] { ".jpg", ".jpeg", ".jpe", ".jfif" })
- {
- }
- public enum PropertyNames
- {
- Quality = 0
- }
- public override Document OnLoad(Stream input)
- {
- using (Image image = PdnResources.LoadImage(input))
- {
- Document document = Document.FromImage(image);
- return document;
- }
- }
- }
- }
|