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
pull/15258/head
Nicholas-Westby 3 years ago
committed by GitHub
parent
commit
ff4dd1811f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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") 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" }, AppleUniformTypeIdentifiers = new[] { "public.image" },
MimeTypes = new[] { "image/*" } MimeTypes = new[] { "image/*" }
}; };
@ -40,6 +40,13 @@ public static class FilePickerFileTypes
MimeTypes = new[] { "image/png" } 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") public static FilePickerFileType Pdf { get; } = new("PDF document")
{ {
Patterns = new[] { "*.pdf" }, Patterns = new[] { "*.pdf" },

Loading…
Cancel
Save