1234567891011121314151617181920212223242526272829303132333435 |
- using PaintDotNet.Data;
- using System.Drawing.Imaging;
- namespace PaintDotNet
- {
- public class PdnFileTypes
- : IFileTypeFactory
- {
- public static readonly FileType Bmp = new BmpFileType();
- public static readonly FileType Jpeg = new JpegFileType();
- public static readonly FileType Gif = new GifFileType();
- public static readonly FileType Tiff = new GdiPlusFileType("TIFF", ImageFormat.Tiff, false, new string[] { ".tif", ".tiff" });
- public static readonly PngFileType Png = new PngFileType();
- public static readonly FileType Tga = new TgaFileType();
- private static FileType[] fileTypes = new FileType[] {
- Bmp,
- Gif,
- Jpeg,
- Png,
- Tiff,
- Tga
- };
- internal FileTypeCollection GetFileTypeCollection()
- {
- return new FileTypeCollection(fileTypes);
- }
- public FileType[] GetFileTypeInstances()
- {
- return (FileType[])fileTypes.Clone();
- }
- }
- }
|