Skip to content

Commit

Permalink
Feature: Added support for rotating JPEG-XR images (#16722)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamparter authored Jan 21, 2025
1 parent 7c23ac0 commit 7a562b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ImagePreviewViewModel(ListedItem item)

// TODO: Use existing helper mothods
public static bool ContainsExtension(string extension)
=> extension is ".png" or ".jpg" or ".jpeg" or ".bmp" or ".gif" or ".tiff" or ".ico" or ".webp";
=> extension is ".png" or ".jpg" or ".jpeg" or ".bmp" or ".gif" or ".tiff" or ".ico" or ".webp" or ".jxr";

public override async Task<List<FileProperty>> LoadPreviewAndDetailsAsync()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Files.Shared/Helpers/FileExtensionHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static bool HasExtension(string? filePathToCheck, params string[] extensi
/// <returns><c>true</c> if the fileExtensionToCheck is an image; otherwise, <c>false</c>.</returns>
public static bool IsImageFile(string? fileExtensionToCheck)
{
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif", ".webp");
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif", ".webp", ".jxr");
}

/// <summary>
Expand All @@ -42,7 +42,7 @@ public static bool IsImageFile(string? fileExtensionToCheck)
/// <returns><c>true</c> if the fileExtensionToCheck is an image; otherwise, <c>false</c>.</returns>
public static bool IsCompatibleToSetAsWindowsWallpaper(string? fileExtensionToCheck)
{
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif");
return HasExtension(fileExtensionToCheck, ".png", ".bmp", ".jpg", ".jpeg", ".jfif", ".gif", ".tiff", ".tif", ".jxr");
}

/// <summary>
Expand Down

0 comments on commit 7a562b8

Please sign in to comment.