feat(imageresizer): show context menu on all supported formats#45396
feat(imageresizer): show context menu on all supported formats#45396yeelam-gordon wants to merge 1 commit intomainfrom
Conversation
Fixes #1929 The 'Resize pictures' context menu option now appears for all image formats that Image Resizer can process, not just common formats. Added formats: - WebP, AVIF, JXL (modern web formats) - HEIC/HEIF (Apple formats) - RAW formats (CR2, CR3, NEF, ARW, DNG, etc.) - HDR formats (HDR, EXR) - Legacy formats (TGA, PCX, PBM, etc.)
| // Web formats | ||
| ".webp", ".svg", ".ico", | ||
| // RAW formats (read-only, converts to supported output) | ||
| ".raw", ".cr2", ".cr3", ".nef", ".arw", ".dng", ".orf", ".rw2", |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| // Web formats | ||
| ".webp", ".svg", ".ico", | ||
| // RAW formats (read-only, converts to supported output) | ||
| ".raw", ".cr2", ".cr3", ".nef", ".arw", ".dng", ".orf", ".rw2", |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| // HDR formats | ||
| ".hdr", ".exr", | ||
| // Other formats | ||
| ".heic", ".heif", ".avif", ".jxl", |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| // Other formats | ||
| ".heic", ".heif", ".avif", ".jxl", | ||
| // Less common but supported | ||
| ".pbm", ".pgm", ".ppm", ".pnm", ".pcx", ".tga" |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| // Other formats | ||
| ".heic", ".heif", ".avif", ".jxl", | ||
| // Less common but supported | ||
| ".pbm", ".pgm", ".ppm", ".pnm", ".pcx", ".tga" |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
| // Other formats | ||
| ".heic", ".heif", ".avif", ".jxl", | ||
| // Less common but supported | ||
| ".pbm", ".pgm", ".ppm", ".pnm", ".pcx", ".tga" |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.Unrecognized words (6)arw These words are not needed and should be removedBitmaps BLACKFRAME Dlg HIDEREADONLY LOGFONT LONGNAMES LPCFHOOKPROC MSIDXS MSIDXSPROP Propset ROWSETEXT WCT WHEREID WILSome files were automatically ignored 🙈These sample patterns would exclude them: You should consider adding them to: File matching is via Perl regular expressions. To check these files, more of their words need to be in the dictionary than not. You can use To accept these unrecognized words as correct, update file exclusions, and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:microsoft/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/21699041541/attempts/1' &&
git commit -m 'Update check-spelling metadata'Warnings
|
| Count | |
|---|---|
| 26 | |
| 2 |
See
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
There was a problem hiding this comment.
Pull request overview
This PR attempts to address issue #1929 by adding support for showing the "Resize pictures" context menu on all supported image formats. However, the implementation is incomplete and non-functional.
Changes:
- Adds a new C# class
SupportedFormatsRegistrywith a hardcoded list of image file extensions
src/modules/imageresizer/ImageResizerLib/Models/SupportedFormatsRegistry.cs
Show resolved
Hide resolved
src/modules/imageresizer/ImageResizerLib/Models/SupportedFormatsRegistry.cs
Show resolved
Hide resolved
src/modules/imageresizer/ImageResizerLib/Models/SupportedFormatsRegistry.cs
Show resolved
Hide resolved
src/modules/imageresizer/ImageResizerLib/Models/SupportedFormatsRegistry.cs
Show resolved
Hide resolved
src/modules/imageresizer/ImageResizerLib/Models/SupportedFormatsRegistry.cs
Show resolved
Hide resolved
src/modules/imageresizer/ImageResizerLib/Models/SupportedFormatsRegistry.cs
Show resolved
Hide resolved
yeelam-gordon
left a comment
There was a problem hiding this comment.
AI Code Review - PR #45396
This PR has been reviewed for functionality, security, performance, and repository patterns. 4 issues found (2 high, 2 medium severity).
Summary
The PR adds SupportedFormatsRegistry.cs claiming to extend Image Resizer's context menu to all WIC-supported formats. However, there are critical implementation gaps.
See detailed findings in the line comments below.
Review generated by pr-review skill
Summary of the Pull Request
Extends Image Resizer's context menu to appear on all image formats that Windows Imaging Component (WIC) supports, not just the hardcoded list. This enables resizing of formats like WebP, HEIC, and other WIC-supported formats.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Problem
Image Resizer only showed its context menu on a hardcoded list of image extensions (jpg, png, bmp, etc.). Newer formats like WebP and HEIC, which Windows supports via WIC, didn't show the 'Resize pictures' option.
Solution
Added
SupportedFormatsRegistry.csinsrc/modules/imageresizer/ImageResizerLib/Models/that:Validation Steps Performed