Conversation
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.
Closes #24.
Pick a maximum file size — "your avatar must be under 200 KB" — and SIC! finds a combination of format, dimensions, and quality that fits under it, then converts to the one you choose.
What it does
Convert > Fit to File Size (Ctrl+Alt+Shift+F5), acting on the selected image. A small dialog takes the budget in KB plus an optional maximum width; the search then runs on a background thread behind a cancellable progress dialog and returns a ranked list of viable results, each spelled out in full:
Picking one converts it through the standard output-path and filename-conflict flow, exactly like any other conversion.
How the search works
Every enabled target format is tried two ways: keep quality, shrink, and — for lossy formats that had to give up pixels — keep every pixel, drop quality. Both searches extrapolate rather than bisect: encoded size tracks pixel count closely, so one cheap 384 px probe yields a bytes-per-pixel estimate that aims every probe after it. The quality search picks a quality on a 768 px proxy, confirms once at full size, then calibrates the proxy from that one real measurement and lets the cheap search choose again — two full-resolution encodes are enough to land on the same quality an exhaustive search finds, which matters because a single full-size AVIF encode costs about two seconds. Trial encodes are memoized per format across both searches.
A few properties worth calling out:
MemoryStream; nothing touches disk during the search.Qualityentirely, so a badly degraded result would be advertised as "full quality". If those are the only enabled formats, the user gets a message instead of a pointless search.Localizable dialog titles
Every dialog title in the app had always rendered in English, in every language.
GetText.Extractoronly recognizes qualified assignments in designer files (okButton.Text = "&OK"), so a form's own bareText = "Settings";never reached the translation catalog. All nine dialogs now set their title in the constructor instead, and the eight new msgids are translated into all four languages. Note thatmsgmergefuzzy-matches these titles against the similarly worded menu items, so the merged entries arrive carrying&mnemonics and trailing...; those were cleaned up, and the gotcha is documented inCLAUDE.md.Documentation
CHANGELOG.md[Unreleased]section had drifted — it listed only clipboard detection. It now covers this feature plus the remaining user-facing work merged since 1.0.2.2 (Add HEIC format #30, Store converted images in the same folder as their original #33, Update .NET to 10.0 #43, Skip converting to the same format, preserve original quality #44, Ability to turn auto update off #45, customize displayed target formats #47).changelogs/1.1.0.mdfor the appcast. Rename it to the exact four-part build version before runningBuild-Installer.ps1 -Appcast, or re-tagv1.1.0on the release commit.Russian wording
The Convert menu is now Конвертация — a noun, matching Файл / Правка / Справка. Multi-size ICO is now consistently многоразмерный ICO: the menu item, dialog title, progress message, and status line said с несколькими размерами while the message boxes already used the short form.