Skip to content

feat(images): width × height in Edit pictures, in px, cm, mm or inches - #726

Merged
KnifeLemon merged 1 commit into
mainfrom
feat/edit-pictures-size-units
Oct 28, 2026
Merged

KnifeLemon merged 1 commit into
mainfrom
feat/edit-pictures-size-units

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

What does this change?

Closes #725 (asked by @khankhanmohsin93-rgb on #645).

  • Set width and height in the Edit pictures window, the free size presets have had since [Feature]: Custom image resize (free width × height, optional aspect-ratio lock) #576:
    • Keep aspect ratio (on by default here) fits each picture inside the width × height.
    • Unticked, the picture is stretched to exactly that size.
  • Units: 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 saved pictures record it. That's what upload forms asking for a 3.5 × 4.5 cm photo expect: 413 × 531 px at 300 DPI.
  • Switching the unit shows the same pixels in the new unit, so it never changes the size by itself.
  • The size line under the fields counts a stretched size as exactly that size, as the encoder writes it.

Stored the way 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.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format --verify-no-changes on the changed files
  • dotnet 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.
  • Checked the rendered window (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

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files (width, height, unit and the four unit names)
  • No new third-party code or binaries
  • The PR does one thing

🤖 Generated with Claude Code

…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>
@github-actions github-actions Bot added the feature New features label Oct 28, 2026
@KnifeLemon
KnifeLemon merged commit 25eb43a into main Oct 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit pictures: width × height with aspect lock, in px, cm, mm or inches

1 participant