Commit Graph
11425 Commits
Author SHA1 Message Date
Korg1ch 0f12ac151f fix(engine): refuse a Content-Aware Fill with nothing to sample instead of filling black (#6532) 2026-10-18 09:19:41 +03:00
SBaksa 47ff3a99bf CMYK ink compositing: keep layers without an alpha channel
The ink compositor skipped a layer with no tiles in the rect whose default
pixel was all zeros, reading the last value as alpha. A CMYK layer without
an alpha channel defaults to no ink, which is opaque blank paper, so under
an adjustment (Threshold, Invert, ...) its untouched pixels composited as
transparent. Skip only surfaces with an alpha channel and a transparent
default, as `empty_in` does.
2026-10-18 17:11:35 +11:00
SBaksa a4cb23a33f Merge remote-tracking branch 'origin/main' into cmyk-native-composite
# Conflicts:
#	crates/compose/src/lib.rs
#	crates/io/tests/cmyk_composite_export.rs
2026-10-18 17:11:34 +11:00
nrq6993-a11yandCursor 4b88e94f91 macOS: keep bundled Dock icon after eframe loads (storytold/photocraft#7253)
Skipping with_icon on .app bundles let eframe substitute its default glyph once
the window opened; pass IconData::default() so the bundle .icns stays in the Dock.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 09:04:38 +03:00
sanches b8ebf39601 i18n: add Danish interface translation
A complete catalog of 4,227 entries: every plain UI string, @id
command, @msg template, @plural pair and disambiguation context in the
key union, written from the meaning of the English labels in standard
Danish (Microsoft/Apple style, informal du, accented imperatives:
Installér, Annullér, Duplikér). Photo vocabulary follows Danish
Photoshop conventions: lag, pensel, markering, lærred, maske, kurve,
farveprøve.

One/other plural rule, as in German. The mixer-brush Flow reads
Gennemstrømning and bit depths hyphenate (8-bit), where the strict
coverage tests demand a visible difference from English. Registered in
the language list (21 -> 22) with da-DK locale matching.
2026-10-18 09:01:53 +03:00
nrq6993-a11yandCursor 33398aeb1c fix(ui): allow collapsing brush folders while searching (storytold/photocraft#7257)
Search no longer forces groups and nested folders open; collapsed state is honored during filter.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 08:44:16 +03:00
seotarek b484a2edb9 fix(atn): reject numeric layer references in .atn export (#7248) 2026-10-18 08:36:25 +03:00
skylar taylor-barrick 3794e6fbbe Merge pull request #7118 from nicolasfalesy/perf/stack-mode-moments
perf(stack): one loop per statistic, up to 2.2× faster, bit for bit the same
2026-10-17 23:28:16 -06:00
ahmed0magdyandClaude Opus 5.5 781a842d89 test(io): the SVG text-transform test shapes with the bundled Inter (#4806)
transformed_text_lands_where_resvg_draws_it returned early, and passed
without checking anything, when the import found no font: it relied on
system fonts, and photocraft_text::CRAFT_FONTS is empty unless the build
sets CRAFT_FONTS_DIR. With the system fonts hidden it passed in 0.00 s.

It is now a unit test in src/svg.rs that parses through parse_with with
a font database holding only the bundled Inter Regular (always compiled
in), and renders its resvg reference from the same parse, so both sides
use the same face. An empty import is now a failure. It fails with the
#5334 fix reverted, and passes with the system fonts hidden.

Raised in review of #5334 by tanish2k09.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 05:23:35 +00:00
Nicolas FalesyandClaude Opus 5.5 9ff27ec204 perf(stack): one loop per statistic, 1.3–2.2× faster on one thread
#6462 left Mean, Variance, Standard Deviation, Skewness and Kurtosis 5–15%
slower than the old serial loop on one thread. The cause: `stat` matched on
the mode three times per pixel inside one shared loop. `combine` now picks
the statistic once and hands `combine_with` a closure with a constant mode,
so each statistic gets its own loop with the match folded away. The sample
buffers are sized to the layer count and filled by index instead of `push`,
which re-checked the capacity per sample.

Every output is bit for bit the same (121 hashes match main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FUAqfMqVHdoeDa2y68KQQw
2026-10-18 06:54:53 +02:00
skylar taylor-barrick 2d0f3b61cf Merge pull request #2376 from Unemars/content-aware-workspace
Content-Aware Fill workspace, as Photoshop's
2026-10-17 22:50:54 -06:00
Davit MatchakhelidzeandClaude Opus 5.5 e40413bed9 Merge main; Georgian rows for the strings added upstream
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YMTAbGNRxnMEzRvYnQGphF
2026-10-18 08:31:58 +04:00
dotCooCoo 2f797ddea3 Print: list printers and spool from one thread at a time
On Windows 11 (winspool.drv 10.0.26100.9444) the custom_print_paper
test binary died with STATUS_ACCESS_VIOLATION. Its three tests open
the Print dialog at once, and each one lists printers: file.printers
calls craft_print::printers(), which opens each printer's PrintTicket
provider (PTOpenProvider). winspool creates a process-wide cache
without a lock the first time PTOpenProvider is called for a printer
whose provider is PrintConfig.dll. When two threads do this together,
winspool can leave its pointer to the cache on a freed object, and the
next caller enters that object's deleted critical section. The app can
make the same calls from two threads: the Print dialog on the UI
thread and a print job's worker.

print_cmds::with_spooler holds a process-wide lock around every call
PhotoCraft makes into craft-print that lists printers or reaches the
spooler or a driver: craft_print::printers and submit, and rgb's
printers, default_printer, page, print and settings_dialog. A panic
inside the lock does not block later callers. While a print job is
being handed to the spooler, File › Print waits for it before the
dialog opens.

Session::printer_source supplies the printers that file.printers,
file.print.printers and the Print dialog list, in place of the
spooler's. The tests that open Print or list printers set it, so they
no longer query the system's printers or load their drivers.
print_cmds::system_printer_listings counts the real listings, and the
dialog and print job tests assert that it stays 0. The app leaves
printer_source unset and lists the spooler's printers as before.

New tests: printer_listings_enter_the_spooler_one_thread_at_a_time
(eight threads list printers at once; it fails without the lock) and
a_panic_inside_the_spooler_does_not_block_later_callers.
2026-10-17 20:54:13 -07:00
Codex d3d1506e13 single_instance: the menu override is on and off exactly as main.rs reads it 2026-10-17 20:19:02 -07:00
Codex b5fb2fde62 single_instance: each environment override is off the way it is read 2026-10-17 20:19:02 -07:00
skylar taylor-barrick 8c30a41e06 Merge pull request #7126 from dotCooCoo/fix/stack-statistics-same-bits-on-windows
Stack Mode: Kurtosis and Skewness give the same bits on Windows and Linux
2026-10-17 21:08:12 -06:00
Michael HigginsandClaude Opus 5.5 4d9f163c61 Linux: Reveal never hands xdg-open a file (#7166) (#7168)
Reveal in Finder on Linux opens the linked file's parent with xdg-open,
which launches whatever it is given. A link stored as `tool.jar/a.png`
names a file as its parent, so Reveal launched that file. Reveal now
refuses a parent that is not a folder.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:53:59 -06:00
Michael Higgins 72b4a8c0bf Merge branch 'storytold:main' into fix/5884-delay-load-windows-data-pdf 2026-10-17 22:27:05 -04:00
Codex 5c48fa987d Save As on Linux: the one file type offered gives the name its extension
With a single type offered the portal reports no filter, and the dialog opens on the stem (services::dialog_file_name), so accepting the name as shown returned a bare path: Swatches became a file named "Swatches" instead of "Swatches.aco" for the Swatches and preset-export flows. The sole filter's extensions are now used when the answer names no type this dialog offered; several types with no pick still add nothing, and an extension the user typed stays their own (with_chosen_type keeps one it recognises).

Tests: the mock portal answers the bare stem for a single filter and gets back Swatches.aco; chosen_type is also checked directly, so the rule is covered where no dbus-daemon exists to run the portal test.
2026-10-17 19:24:29 -07:00
Codex a52f458702 Layer Export As: the dialog opens with the layer's size, not the document's
open seeds width and height from the document, and open_layer replaced only the internal __w/__h, so the dialog showed and edited the document's size while the export used the layer's trimmed pixels: a 10x6 layer in a 40x30 document opened at 40x30, and editing one side started from the wrong value. In scale mode the fields now follow the layer's trimmed size; a remembered exact pixel size stays, because that is a size the user asked for.

Test: a 10x6 layer in a 40x30 document opens at 10x6, a remembered 50 percent at 5x3, and remembered pixels are untouched.
2026-10-17 19:22:42 -07:00
Codex a465fd2b1c A second launch that sets only environment overrides keeps its own process
PHOTOCRAFT_PRESENT_MODE, PHOTOCRAFT_FRAME_LATENCY, PHOTOCRAFT_STROKE_TRACE, PHOTOCRAFT_IN_WINDOW_MENUS and the two automation roots are documented as the equivalent of the per-launch flags, and a per-launch flag makes a launch keep its own process. A launch that sets only variables left launch_options empty, so it handed its files to the running instance (or merely raised its window) and exited before any override was read. Those variables now count as the flags they stand for; empty and 0 mean off, as with PHOTOCRAFT_NEW_INSTANCE.

Test: each variable maps to its flag, a value that means off maps to nothing, and skip_reason names the flag.
2026-10-17 19:22:42 -07:00
skylar taylor-barrick ceb85009c7 perf(canvas): a Properties-panel adjustment drag refreshes only the view (#6839) (#7155)
`damage_since` had a case for the Image > Adjustments dialog but none for the
Properties panel's `live_adjust` preview, so every parameter change returned no
damage and recomposited the whole document — `gpu-full` at 24.0 MP.

That is what made #5778 a latency regression at 100 % zoom: it correctly stops
CPU-compositing a 1.5 MP proxy, but the full-size GPU composite replacing it is
per-pixel work and 24 MP of it costs more. The Properties path now gets what the
dialog had: a session-tagged key, the layer's area as damage, and of that only
what the view shows, catching up as the view moves.

Intel UHD P630, 24 MP document, 12 changes, medians:

  v0.9.0    70.3 ms   1.5 MP CPU proxy
  main     203.1 ms   gpu-full, 24.0 MP
  this      47.8 ms   gpu-rect, 1.10 MP

Byte-identical to the full-refresh base on all 12 changes and across a pan.
25 % zoom and PHOTOCRAFT_CPU_COMPOSE are unchanged.

`live_region` does not narrow by the layer's mask: a reveal-all mask keeps its
coverage in the default pixel and reports empty content bounds, which emptied
the damage and froze the preview. Every adjustment layer has one.
2026-10-17 20:21:51 -06:00
Jeremy YaoandClaude Opus 5.5 cfe8ae5c09 Animation Effects: plainer Linux/BSD reader
- The worker thread shares its latest answer with the UI as a plain
  Option<bool> behind a mutex, instead of a byte that needed encode and
  decode helpers.
- Finding the user's config directory is its own small function.
- In freedesktop.rs, the two dense one-liners in without_portal are split
  into named steps, and the parsers are pub(super) (ini_value private): only
  the animations module uses them.

No change in behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 22:20:54 -04:00
haranishi dd21e325b5 fix(appimage): expose the bundled CLI and MCP entry point 2026-10-18 10:55:00 +09:00
Jeremy YaoandClaude Opus 5.5 0bdac25172 Merge branch 'main' into feature/animation-effects
Brings in 20 commits from main. Two conflicts, both in dependency lists:
- apps/photocraft-web/Cargo.toml: main added the web-sys DomRect feature; the
  list is main's plus this branch's MediaQueryList.
- Cargo.lock: main's, with cargo adding back this branch's one line (the
  desktop app's direct windows dependency).

docs/scorecard.md is regenerated; it differs from main only in UI-217-10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:47:37 -04:00
Brandon ThomasandClaude Opus 5.5 8407d9ccb1 Release 0.10.0 (#7192)
* Release 0.10.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cargo.lock: photocraft-ipp at 0.10.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
v0.10.0
2026-10-17 21:28:00 -04:00
ametadot c9fc1f3b2e test(camera-raw): keep identity tests after production source 2026-10-18 12:21:47 +11:00
Korg1ch cc3ca41c6d test(liquify): zoom keys step the preview, not the canvas; pinch and wheel zoom about the pointer (#7210) 2026-10-18 04:17:32 +03:00
Korg1ch 5ed2a1ff99 fix(liquify): zoom the preview with ⌘+/⌘−/⌘0/⌘1, a trackpad pinch and ×1.1 wheel notches, as in Photoshop (#7210) 2026-10-18 04:17:32 +03:00
David MannandClaude Opus 5.5 b450baa6eb Image: Trim and merged Duplicate report an error on documents over 2^30 px (#7223)
`compose::flatten` returns an empty buffer for canvases over MAX_RENDER_PIXELS.
Trim (Top Left) indexed `px[0]` of it and Duplicate › Merged Layers Only fed it
to `write_region`'s length assert: both panicked; Trim's other modes reported
"nothing to trim to". Both now return a "too large to flatten" error first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:02:31 +02:00
dotCooCoo 0bdea678e7 Merge main into fix/abr-repeated-brush-names 2026-10-17 18:02:25 -07:00
carterwsmith 61db2b2bba Group all selected layers from the Layers panel footer 2026-10-17 18:00:15 -07:00
Vikram Bhaskaran db546ff482 Merge origin/main into fix/3050-dissolve 2026-10-18 11:56:48 +11:00
Vikram Bhaskaran af2f5ad4b7 Merge origin/main into fix/clipboard-center-overflow 2026-10-18 11:56:41 +11:00
Vikram Bhaskaran c87af035b7 Merge origin/main into feat/iff-read 2026-10-18 11:56:31 +11:00
Vikram Bhaskaran 4a2a73c226 Merge origin/main into feat/dicom-read 2026-10-18 11:55:26 +11:00
Vikram Bhaskaran cf2d819fad Merge origin/main into fix/5258-psd-open 2026-10-18 11:54:46 +11:00
David MannandClaude Opus 5.5 15b8a33cb4 Rotated view: Type box and Move marquee previews follow the document axes (#7063)
The Type tools' drag box and the Move tool's layer marquee were drawn as
an upright screen rectangle through two mapped corners, while the
release creates a document-axis box (the text box, layer.selectInRect).
In a rotated view the preview and the result disagreed; at 45 degrees a
dragged square previewed as a sliver. Map the four document corners to
the screen instead, as the selection marquee does since #2512.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 02:50:36 +02:00
Vikram Bhaskaran 0397867a65 Add catalog entries for Move Up and Move Down (#6498).
every_tl_literal_is_translated requires every complete-menu language
to include the new Layer Comps context actions.
2026-10-18 11:47:04 +11:00
UnemarsandClaude Fable 5.1 66c0e4ce13 Content-Aware Fill workspace: review follow-ups (#2376)
Testing on a 6000 × 4000 document found the proxy's sampling state computed
per pixel against every stroke segment: each stroke got slower, and an undo
tested 1.7 M pixels × 3000 segments on the UI thread, blocking it for over a
minute. The proxy is now painted as the engine paints the full-resolution
mask: the option's area and the fill area are sampled once at the proxy's
pixel centres (set_base), and each stroke is painted over them in order,
visiting only its own pixels (paint, restate_all), so a dab costs its segment
and a rebuild costs the strokes' areas.

Also from the same review:
- `edit.contentAwareFill {"ui": …}` with the workspace closed is an error
  instead of a fill with the defaults (an agent polling the state after an
  Esc added a fill per poll).
- The view sends one Down per press: the press is the stroke's first point
  and the frames before egui's drag threshold are its next ones, instead of
  drag_started() beginning the stroke over (the lasso lost its first points
  the same way; the Zoom tool zoomed on every frame the button was held).
- The preview texture is box-averaged to the device's max_texture_side when
  the plan's rectangle exceeds it (a 17000 px wide plan gave a validation
  error every frame).
- A preview that fails counts as shown for that state (Preview::finish), so
  it is reported once instead of restarting on every repaint.
- The view shows the document's visible layers composited (an Apply to a new
  layer shows); the engine's limits on strokes, lasso edits and points hold
  at the brush with a message instead of failing Apply; the footer is
  Photoshop's reset, OK, Apply, Cancel on every platform; a leftover
  `let _ = i;` is gone.

Tests: strokes painted once and equal to the engine's sampling area; `ui`
with the workspace closed; the first points of a stroke and a lasso through
egui_kittest; the preview texture at a 2048 limit; a failing preview
reported once; the view after Apply to a new layer; the limits at the brush.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 02:20:20 +02:00
Higgs32584andClaude Opus 5.5 204c76ce36 fix(psd): an edited type layer keeps its Txt2 object instead of a bare stub (#6968)
When a type layer's text changed, build_txt2 replaced the layer's object in
Photoshop's own Txt2 block with a bare `<< /0 << /0 text /6 runs >> >>`:
no paragraph runs (/5), no view (/1, which names the object's frame) and none
of the style keys. Photoshop 27.10 quits while opening such a file
(layer_effects.psd after type.edit), as it refused stripped objects in #2374.

An edited object now starts from the file's object at its slot: the text is
replaced, the paragraph runs are remade one per paragraph of the new text,
and every other run array of the model (style runs, ...) is cut or extended
to the new length before the auto-kern modes are applied. The view and other
keys are kept; only the old text's glyph pen positions (/21) are dropped.
An object whose run arrays aren't shaped as Photoshop writes them still falls
back to a fresh one.

Test: text edited_text_keeps_the_files_txt2_object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:03:18 -04:00
Korg1ch 3ee6620935 test(ui): cover the Adaptive Wide Angle constraint menu and the orient op 2026-10-18 03:00:09 +03:00
Korg1ch 7e5a97385e fix(ui): right-click an Adaptive Wide Angle constraint for its orientation menu, as in Photoshop 2026-10-18 03:00:09 +03:00
Korg1ch 00e4423fcc test(compose): Dissolve effects are speckled, tile-independent and match on the GPU (#6995) 2026-10-18 02:57:55 +03:00
Korg1ch e0d90b2896 fix(compose): layer effects in Dissolve mode speckle instead of painting as Normal (#6995) 2026-10-18 02:57:44 +03:00
David MannandClaude Opus 5.5 e1ce85a5df PSD: Hue/Saturation export writes each triplet in its own slot (#7065)
The hue2 block holds a colorize triplet at byte 4 and a master triplet at
byte 10. The writer copied the active triplet into both, so a Colorize hue of
200 also landed in the master slot (outside its -180..180 range) and toggling
Colorize in Photoshop showed the wrong values.

Write the active triplet at its own offset and Photoshop's defaults in the
other (colorize 30/25/0, master 0/0/0), with the colorize hue stored signed as
Photoshop does (200 -> -160). The reader maps a negative colorize hue back to
the model's 0..360.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 01:55:28 +02:00
dotCooCoo cfa5242098 Merge main into fix/liquify-smart-filter-reopens-workspace 2026-10-17 16:52:01 -07:00
dotCooCoo 53ced08b23 Liquify: an OK that cannot be applied returns the error
`liquify_ui::commit` discarded the results of
`layer.smartFilter.setParams` and `filter.liquify`. `PhotocraftApp::run`
showed a failed command's error in the status bar, but the control
channel answered `filter.liquify {"ui": {"commit": true}}` with
`{"committed": true}`. `commit` now returns the command's result, and
the control channel returns the error, as `gallery_ui::commit` does. The
dialog closes on OK whether or not the command succeeds, as the Filter
Gallery's does.

Two tests send OK through the control channel, one after the smart
filters are cleared and one after the layer is deleted. Each checks
that the dialog closed, the status bar shows the error, no history step
was added, and the control channel returned the error.
2026-10-17 16:45:04 -07:00
dotCooCoo a321a69a49 Merge main into fix/paste-svg-from-clipboard 2026-10-17 16:28:37 -07:00
dotCooCoo c2cf0e0610 Merge main into fix/mixer-brush-clean-and-load 2026-10-17 16:28:35 -07:00