Repository navigation
feat(images): width × height in Edit pictures, in px, cm, mm or inches - #726
Merged
Merged
Conversation
…es (#725) The Edit pictures window offered only original size, percent, long edge and width. It now also offers "Set width and height", the free size presets have had since #576: fitted inside with the aspect kept (on by default there, so a first try never squeezes a photo) or stretched to exactly that size. The size can be entered in px, cm, mm or inches. A printed size needs a resolution, so cm, mm and inches show a DPI box (300 by default): the size becomes pixels at that DPI and the pictures record it, as upload forms that ask for a 3.5 × 4.5 cm photo expect. Switching the unit shows the same pixels in the new unit. Stored as presets store a free size, CustomSize with Resize None, so an older Filee still reads the tool; CustomSize also keeps the unit and DPI the window shows (a unit a later version adds reads as px). The size after the change under the fields counts a stretched size as exactly that size. Co-Authored-By: Claude Opus 5.5 <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 does this change?
Closes #725 (asked by @khankhanmohsin93-rgb on #645).
Stored the way presets store a free size,
CustomSizewithResizeNone, so an older Filee still reads the tool.CustomSizealso keeps the unit and DPI the window shows; a unit a later version adds reads as px.Type of change
How was it tested?
dotnet format --verify-no-changeson the changed filesdotnet test:ImageEditWindowTests: stretch and fit in px, cm at 300 and 600 DPI with the DPI written, unit switches keeping the pixels, the choices remembered and reopened in mm at 350 DPI, and the screenshots below.ImageEditToolTests: saving and reading the unit, an unknown unit, and the px ↔ cm / mm / inch conversion.LocalizationTests,SetupTextsTests, the encoder's resize tests.window-image-edit-size-*): en light and dark, ko, ar (right to left), ru, de dark and th. Nothing is cut off.Screenshots (UI changes)
tests/Filee.App.Tests/bin/*/screenshots/window-image-edit-size-*.png: width, ×, height and unit on one row, then Keep aspect ratio with the DPI box at the end of the row when the unit is cm, mm or inches.Checklist
src/Filee.App/Assets/i18n/*.jsonfiles (width, height, unit and the four unit names)🤖 Generated with Claude Code