feat: export fingerprint image as PNG - #17
Merged
Merged
Conversation
Adds a "File → Export Fingerprint as PNG..." command (Ctrl+Shift+E) that saves the currently-displayed fingerprint to a PNG via a save dialog. - IFileDialogService/FileDialogService: add ShowSaveFileDialogAsync mirroring the existing open-dialog pattern (Avalonia SaveFilePickerAsync). - MainWindowViewModel: ExportPngCommand gated on an image being decoded (CanExportPng; re-evaluated via NotifyCanExecuteChangedFor when the bitmap changes). Saves the already-decoded WriteableBitmap with Bitmap.Save (Skia PNG encode — no native deps, cross-platform). - MainWindow.axaml: File-menu item; auto-disables when no image is shown. - README/project_context: check off PNG export; fix stale .NET 8 -> .NET 10 references in project_context. Note: export lives in the Avalonia UI layer (the project has no headless UI test harness), so this is covered by cross-platform compile + the existing Core suite in CI; the save/render path itself needs a manual smoke-test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- CanExportPng also requires !IsDecodingImage (and _isDecodingImage notifies the command) so the menu disables while a decode is in flight. - ShowSaveFileDialogAsync sets FilePickerSaveOptions.DefaultExtension (derived from the first *.ext filter) so bare filenames get .png on Linux/macOS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds File → Export Fingerprint as PNG... (
Ctrl+Shift+E) — saves the currently-displayed fingerprint image to a.pngvia a save dialog.How
WriteableBitmapfor display. Export reuses it:bitmap.Save(path)(Skia PNG encode — managed, cross-platform, no native deps).IFileDialogService/FileDialogServicegainShowSaveFileDialogAsync, mirroring the existing open-dialog pattern (SaveFilePickerAsync).ExportPngCommandis gated on an image being present (CanExportPng, re-evaluated via[NotifyCanExecuteChangedFor]); the menu item auto-disables otherwise.Folded in
project_context.md: fixed stale.NET 8→.NET 10(leftover from the chore: bump to .NET 10 (LTS) #14 bump).Verification & honest gap
🤖 Generated with Claude Code