Browse Source

feat (File Picker) add WebP to FilePickerFileTypes (#15242)

WebP is a common image format these days, so I added it to the list of "All Images" as well as its own file picker file type.

Metadata derived from: https://developers.google.com/speed/webp/docs/riff_container
release/11.1.0-beta2
Nicholas-Westby 2 years ago
committed by Max Katz
parent
commit
d5a9d14b54
  1. 9
      src/Avalonia.Base/Platform/Storage/FilePickerFileTypes.cs

9
src/Avalonia.Base/Platform/Storage/FilePickerFileTypes.cs

@ -21,7 +21,7 @@ public static class FilePickerFileTypes
public static FilePickerFileType ImageAll { get; } = new("All Images")
{
Patterns = new[] { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.bmp" },
Patterns = new[] { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.bmp", "*.webp" },
AppleUniformTypeIdentifiers = new[] { "public.image" },
MimeTypes = new[] { "image/*" }
};
@ -40,6 +40,13 @@ public static class FilePickerFileTypes
MimeTypes = new[] { "image/png" }
};
public static FilePickerFileType ImageWebp { get; } = new("WebP image")
{
Patterns = new[] { "*.webp" },
AppleUniformTypeIdentifiers = new[] { "org.webmproject.webp" },
MimeTypes = new[] { "image/webp" }
};
public static FilePickerFileType Pdf { get; } = new("PDF document")
{
Patterns = new[] { "*.pdf" },

Loading…
Cancel
Save