public PaaFileType(IFileTypeHost host) : base("PAA texture", new FileTypeOptions() { LoadExtensions = new[] { ".paa" }, SaveExtensions = new[] { ".paa" }, SupportsLayers = false }) { this.host = host; }
public WebPFileType(IFileTypeHost host) : base("WebP", new FileTypeOptions { LoadExtensions = new string[] { ".webp" }, SaveExtensions = new string[] { ".webp" } }) { if (host != null) { strings = new PdnLocalizedStringResourceManager(host.Services.GetService <PaintDotNet.WebP.IWebPFileTypeStrings>()); } else { strings = new BuiltinStringResourceManager(); } }
/// <summary> /// Initializes a new instance of the <see cref="AvifFileTypePlugin"/> class. /// </summary> /// <param name="host">The host.</param> /// <param name="maxEncoderThreads">The maximum number of encoder threads.</param> public AvifFileTypePlugin(IFileTypeHost host, int?maxEncoderThreads) : base( "AV1 (AVIF)", new FileTypeOptions { LoadExtensions = new string[] { ".avif" }, SaveExtensions = new string[] { ".avif" }, SupportsCancellation = true, SupportsLayers = false }) { PaintDotNet.Avif.IAvifFileTypeStrings avifFileTypeStrings = host?.Services.GetService <PaintDotNet.Avif.IAvifFileTypeStrings>(); if (avifFileTypeStrings != null) { this.strings = new PdnLocalizedStringResourceManager(avifFileTypeStrings); } else { this.strings = new BuiltinStringResourceManager(); } this.maxEncoderThreadsOverride = maxEncoderThreads; this.byteArrayPool = new Lazy <IByteArrayPool>(() => new ByteArrayPool()); }
public FileType[] GetFileTypeInstances(IFileTypeHost host) { return(new FileType[] { new DdsFileType(host.Services) }); }
public FileType[] GetFileTypeInstances(IFileTypeHost host) { return(new FileType[] { new WebPFileType(host) }); }
public FileType[] GetFileTypeInstances(IFileTypeHost host) { // Tell PDN we exist and are a usable file type return(new FileType[] { new DMIFileType() }); }
public FileType[] GetFileTypeInstances(IFileTypeHost host) { return(new[] { new AvifFileTypePlugin(host) }); }
/// <summary> /// Initializes a new instance of the <see cref="AvifFileTypePlugin"/> class. /// </summary> /// <param name="host">The host.</param> public AvifFileTypePlugin(IFileTypeHost host) : this(host, null) { }