Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebP support #1813

Merged
merged 6 commits into from
Nov 11, 2024
Merged

WebP support #1813

merged 6 commits into from
Nov 11, 2024

Conversation

qdraw
Copy link
Owner

@qdraw qdraw commented Nov 11, 2024

PR Details

Description / Motivation and Context

This pull request adds support for the WebP image format across various parts of the codebase. The changes include updating enums, extending helper methods, and modifying test cases to handle the new format.

Adding WebP support:

  • Added webp to the ImageFormat enum in ExtensionRolesHelper.cs and IFileIndexItem.ts. [1] [2]
  • Created a new list ExtensionWebp for WebP file extensions and added it to the MapFileTypesToExtensionDictionary. [1] [2]
  • Updated methods to include WebP in supported lists for synchronization, ExifTool, and thumbnails. [1] [2] [3]
  • Implemented GetImageFormatMetaWebp method to identify WebP files based on their byte signature.
  • Updated GetImageFormat to recognize WebP files.

Client-side updates:

  • Modified list-image.tsx to handle WebP images in the ListImage component.
  • Updated preference-app-settings-desktop.tsx and related test files to include WebP in the default image formats. [1] [2] [3] [4]

Testing:

  • Added a new test class CreateAnImageWebP to generate WebP images for testing purposes.
  • Updated ExtensionRolesHelperTest.cs to include test cases for WebP image format. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Related Issue

How Has This Been Tested

  • C# Unit tests
  • Typescript Unit tests
  • Other Unit tests
  • Manual tests
  • Automatic End2end tests (starsky-tools/end2end)

Types of changes

  • Added for new features
  • Breaking change fix or feature that would cause existing functionality to change
  • Changed for non-breaking changes in existing functionality for example docs change / refactoring / dependency upgrades
  • Deprecated for soon-to-be removed features
  • Removed for now removed features
  • Fixed for any bug fixes
  • Security in case of vulnerabilities

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (update when needed)
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the ./history.md document

# Conflicts:
#	starsky/starskytest/starsky.foundation.readmeta/Services/ReadMeta_ExifReadTest.cs
@qdraw qdraw changed the title WebP reading WebP support Nov 11, 2024
Copy link

sonarcloud bot commented Nov 11, 2024

@qdraw qdraw merged commit db82e17 into master Nov 11, 2024
15 checks passed
@qdraw qdraw deleted the feature/202411_webp branch November 11, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant