Repository navigation
feat(images): pixelate or blur parts of a picture before sharing it - #684
Merged
Merged
Conversation
A "Pixelate / blur" tool on the images donut opens the pictures one at a time in a window drawn like the crop overlay: drag frames over names, faces or numbers, each one showing the picture already pixelated or blurred, move and size them, pick Pixelate or Blur and a strength, then Hide & Save (or Hide & Next). Each picture is written by an ordinary conversion in its own format (PNG when it can't be written), so the toast, the output rules and the history work as usual; the frames carry on to the next picture of a batch. Pixelate averages squares on a grid laid from the picture's corner; blur averages into smaller squares first and then blurs about a line of text wide, so a light, reversible blur is never used. Both are sized from the picture's shorter side. The job queue covers the parts once, in the first step whose engine applies image options, refuses a route that can't, never puts the original back for "only if smaller", and keeps no Retry for them. The previews of the uncovered picture a file carries (EXIF, Photoshop, XMP thumbnails) are dropped. Settings schema 52 adds the tool after Crop and on the images donut after Half size (or on the back face when the front is full). Pixelate or blur and the strength are remembered in the tool, in fields of their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The toolbar gave up its names once they didn't fit, judged against widths that happened to fit at the window's default size with Windows' fonts (German with Skip: 978 of 982 px). With CI's Noto fonts they didn't, so the test that expected the names back at 1040 px failed there. The toolbar now measures each level with the fonts in use and takes the first that fits: all names; then without the names of Clear all and Skip and the keycaps; then icons only. The test checks that rule against the measured widths instead of assuming where names fit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te / blur (52) side by side Both tools sit after "Half size" on the images donut and after "Crop" in the library, Edit pictures first; the v52 step puts Pixelate / blur after Edit pictures when that is there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 8 tasks
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?
A new tool, Pixelate / blur, covers parts of a picture (names, faces, phone numbers in a screenshot) before it is shared.
Dropping pictures on its slice opens them one at a time in a window drawn like the Crop window (same stage, file chip, strip of files, toolbar pill, keycaps, summary card):
Each picture is written by an ordinary conversion (like Cut a clip), in its own format, or PNG when that can't be written (camera RAW, DICOM …), named
{name}_hidden. The toast, cancelling, the output rules and the history work as for any other preset.Destroying what is covered
Donut placement and settings schema
The images donut's front has 10 of 12 slices on main (#617 adds Edit pictures). The tool goes on the front after Half size, after Edit pictures when that follows it, so the front has 12 once both are merged.
Settings schema 52 adds it to existing libraries: after Crop in the library, and on the front after Half size when the front has room. A full front puts it at the end of the back face when that has room. A front without Half size (laid out by the user) is left alone. Like schema 45 did for the clip tool, it repairs the tool if Filee 2.0 saved it as a crop. Main is at 50 and #617 takes 51, so 52 may need renumbering when these are merged.
Compatibility with 2.1.0
presets.jsonstays readable by Filee 2.1.0. Pixelate / blur and the strength are new fields of their own (hideStylewithLenientEnumJsonConverter,hideStrength), so no existing enum gets a new value. 2.1.0 skips the fields and greys out the tool, as a tool it doesn't know. The parts themselves (hiddenAreas) only exist on the conversion a window starts, never on a saved preset.Small changes around it
CropCanvasshares its stage, handle and easing drawing (internal, no change in what it draws).CropQueueItemtakes the name of its done state.Type of change
How was it tested?
dotnet build Filee.slnx -c Release,dotnet format --verify-no-changesdotnet test: Core 678, Engines 1833 and CLI 39 pass. The App suite passes, with the images donut's slice count and the palette's Edit chips updated for the new slice.HideToolTests(Core): effect size per strength and picture size, part to pixels (rounded outwards, clamped), the square a pixel falls in, the conversion, the remembered choice, JSON (saved by name, unknown style read leniently, no parts on a saved tool, existing values unchanged for 2.1.0), no Retry, one-time covering on a two-step route, refusal without an engine that covers, "only if smaller", and the schema 50 → 52 migration (front, after Edit pictures, full front → back, both full, user's own place, repair after 2.0).HideAreasTests(Engines, real ImageMagick): squares are their exact average and nothing outside changes; even the weakest blur leaves random noise within a few levels; a 1.5 px blur keeps 4 px strokes while the weakest real blur leaves at most a level; JPEG stays JPEG; parts land on the upright picture of an EXIF-turned photo; the window's preview equals the conversion; Photoshop/XMP previews go while EXIF data stays.HideWindowTests(App, headless): drawing, moving, sizing, selecting with the mouse, live cover while dragging; every key; Enter starts one conversion with the parts; Esc saves nothing; the choice is remembered; batch with carried frames, Skip, a failing animated GIF and the summary; at the window's smallest width the toolbar drops its labels so every button stays inside (en, de, ru, ne, ar).Screenshots (UI changes)
Rendered by the headless tests (
hide-*.pngintests/Filee.App.Tests/bin/Release/net10.0/screenshots): empty, pixelate and blur in en, ko, de, ar, ru, hi, ne, ja, light and dark, Material You and a theme.json, several files and summary, hover, drag, and the narrowest window.Checklist
src/Filee.App/Assets/i18n/*.jsonfiles (17 keys, 17 languages; short donut names for long ones)🤖 Generated with Claude Code