Commit Graph
11425 Commits
Author SHA1 Message Date
wwew 9df59c96b8 docs: write product name as PhotoCraft in development guide (#5228) 2026-10-14 01:58:14 -04:00
abc2cbandClaude Opus 5.5 c928895a08 smart_map: rustfmt the ZigZag arm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 08:42:54 +03:00
Abdul karim mia c8ff8e3860 Add Color Table dialog translations 2026-10-14 10:58:39 +05:30
SBaksa b0683da93e Merge main into cmyk-native-composite
Resolves the conflict with #4199 in crates/io/src/flat.rs: CMYK targets keep its
profile checks (invalid, non-CMYK or unusable profiles are rejected; untagged
documents embed coated CMYK) and are then mixed on their ink values, falling
back to its RGB round trip through the document's profile for stacks the ink
compositor doesn't handle. RGB-only targets keep #4199's direct sRGB composite.

composite_uses_distinctive_document_profile_on_every_worker now gives its empty
layer a Hue blend, so it still exercises the profile round trip (an ink-native
stack keeps its exact inks instead), and the PNG test expects #4199's warning.
2026-10-14 16:16:02 +11:00
Finn NewickandClaude Opus 5.5 d658c13c4e fix(format): serialise directory bundle saves with a bundle-wide lock
A directory save lists the existing objects, writes its own, publishes its manifest and removes what that manifest doesn't reference. Two writers (two stores, or two processes) saving the same bundle could interleave, and one writer's cleanup could remove an object the other's winning manifest needs. Each save now holds an OS advisory lock on save.lock for its whole transaction; a held lock is waited for (10 s by default, PcraftWriter::set_lock_wait), then the save fails without writing. A crash releases the lock; a file system without file locks saves unlocked as before. Fixes #4957.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 06:12:49 +01:00
Abdul Karim Mia fef5e042bd Support .act color tables end to end (swatches + Color Table dialog)
Closes #1127. Photoshop's .act (256 RGB triplets, optional count/
transparent trailer) now loads everywhere swatches do: a new
photocraft-psd act parser/writer (byte-stable round trip, hostile
lengths are errors), Format::Act in swatches.import/export with
length/extension sniffing, the Swatches panel menu, File > Open
(desktop + web filters, drag-and-drop) and Load/Save buttons in
Image > Mode > Color Table. Verified against a Photoshop-saved
table (256 colors, byte-identical re-export).
2026-10-14 10:35:30 +05:30
Catur Sura 27d912d9bf Merge branch 'main' into feat/transform-ctrl-cursor 2026-10-14 11:55:01 +07:00
safvanedge 647f36a8f6 fix(ui): default active tool on startup to Move tool (#5355)
In Photoshop, the default tool on startup is the Move tool (V) at the top of the toolbar. Set UiState::default().tool to Tool::Move for Photoshop parity and update dependent test assertions.

Also ensure arrow keys in move_mods do not nudge layers while text is actively being edited.

Closes #5355
2026-10-14 10:20:32 +05:30
Catur Sura da13d0312c feat(transform): show distort and skew cursor indicators when holding ctrl 2026-10-14 11:50:03 +07:00
Abdul karim mia 007581b7a4 Remove feature changes from contributor credit PR 2026-10-14 10:12:26 +05:30
Abdul karim mia 03b6af0c12 Keep contributor credit PR focused on contributor entry 2026-10-14 10:12:24 +05:30
jonathnwxh e2ed5cdcb7 Limit blend mode hover refresh to the visible canvas 2026-10-14 12:41:22 +08:00
skylar taylor-barrick 369704ac55 Merge pull request #4599: native Windows printer settings and RGB printing
Share native Windows driver settings and RGB printing through craft-print
2026-10-13 22:38:25 -06:00
Abdul Karim Mia fb3997514f Credit Abdul karim mia in contributors 2026-10-14 07:59:57 +05:30
Abdul Karim Mia ce383de7d8 Map .atn duplicate-into-new-document (Mk) to layer.duplicate
Photoshop records Layer > Duplicate Layer with Destination: New as a
Mk event (document class + layer Usng, Nm = new doc name, LyrN = copy
name), verified against a ScriptListener/XTensions export. Import maps
it to layer.duplicate {document: new}; export writes it back, so the
steps round-trip instead of becoming kept Photoshop steps that fail at
playback. A Dplc with a T document reference (another open doc) now
imports as a kept step rather than misplaying as a same-doc copy.
2026-10-14 07:55:29 +05:30
augrclkandGPT-6 61b0f4699f Brush Settings: show keyboard focus on section locks
Co-authored-by: GPT-6 <noreply@openai.com>
2026-10-14 05:12:20 +03:00
geduful c75160659e fix(gpu): catch validation errors in watched compositor work
The scoped_work function skipped error scopes when watched is true (always the case in the
app because the canvas sets up health monitoring). But error scopes are needed on native
platforms to catch synchronous validation errors (e.g. invalid buffer in queue.write_buffer).
The health callbacks only handle device loss and async errors.

This fixes P12 (arrow-key nudge in a 150-layer document) which crashed with:
wgpu error: Validation Error / Caused by: / In Queue::write_buffer / Buffer with
pc_compose_uniforms label is invalid

Now scoped_work always uses error scopes on native (non-WASM) to catch validation/internal/OOM
errors, while WebGPU relies on health callbacks for async errors.
2026-10-14 02:02:46 +00:00
augrclkandGPT-6 17abae9741 Brush Settings: expose section lock names and state
Co-authored-by: GPT-6 <noreply@openai.com>
2026-10-14 04:52:47 +03:00
Tanish Manku 583425b4df Stroke latency trace: PHOTOCRAFT_STROKE_TRACE times each frame of a brush stroke (#1343) (#4403)
Testers report ~50 ms input-to-pixel while painting on Linux and macOS, and asked for a
per-stage breakdown. With PHOTOCRAFT_STROKE_TRACE=1 the app prints, per stroke, p50/p95 of
the frame interval, pointer moves per frame, the live stroke's render, the canvas refresh
(composite + upload), the UI build, eframe's CPU time (UI, tessellation, submission) and the
remaining vsync/swap-chain wait, with the GPU backend; =<file.csv> also appends every frame.
The last summary is in the control channel's perf.strokeTrace.

RTX 5090, Vulkan, 120 Hz: interval 8.33, cpu 2.2 (ui 0.9, stroke 0.8, canvas 0.4), wait 6.0 ms.
2026-10-13 18:09:37 -07:00
skylartaylor a9ac922fc1 Align printer menu regression with the merged system-printer cache 2026-10-14 02:21:09 +02:00
David MannandClaude Opus 5.5 e6238ad399 PSD save: widen RLE row counts while writing a promoted PSB (#5285)
promote_to_psb used to rewrite every RLE stream in place (grow the
Vec, move the packed rows, widen the count table): a reallocation and
a full extra pass over the channel data of a file that is already over
2 GB, right before to_bytes copies it all once more.

Now promotion only marks the model: PsdFile gains `write_as_psb`. The
model stays a consistent PSD (header version 1, two-byte row counts),
so every reader that decodes it with header.version is unaffected.
to_bytes and encoded_len write version 2, long length fields and
four-byte row counts, widening each table while the stream is copied
out (the packed rows are the same in both versions). written_version()
reports what will be written; pad_layer_info_to() pads the written
body. Promotion checks every count table first, so an error leaves the
model unmarked and the write cannot fail on a table later.

Tests: a promoted PSD writes exactly the PSB written directly and reads
back as it, for every generated case; the promoted model is unchanged
apart from the flag and decodes as before; damaged tables fail with an
error before and after promotion.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 01:34:23 +02:00
Gustavo Ziger e14bd18360 test: update Navigator Animated Zoom regression 2026-10-13 20:03:00 -03:00
IvanandClaude Opus 5.5 e5bf9c22c9 CI: run the Windows tests on two runners instead of three
The integration tests run as one leg again. On the Windows runner (EPYC 7763, 3 runs) that leg
took 14.3-15.3 min, against 10.5-10.8 for each half, so the slowest leg is now the integration
one at ~15 min instead of the unit one at ~12.8. In exchange each PR that runs Windows takes two
Windows runners instead of three and ~7 fewer runner-minutes: every leg pays its own setup
(~1 min) and builds the workspace libraries its tests link against (~4 min even from sccache).
That matters more while PRs queue for the account's concurrent-job limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 01:48:31 +03:00
augrclkandGPT-6 811a40bda2 Brush Pose: preserve independent tilt-axis overrides
Keep X/Y flags through ABR import, presets, commands and painting; retain legacy combined inputs and expose both controls with regression coverage.

Co-authored-by: GPT-6 <noreply@openai.com>
2026-10-14 01:47:21 +03:00
vistaero 6c12e0bc20 Integrate streamed PSB output with the shared save service 2026-10-14 00:45:55 +02:00
vistaero 89ed4cb284 Stream native PSD and EXR imports through bounded seekable bands 2026-10-14 00:45:43 +02:00
vistaero 72dd11087b Stream viewport pages with bounded GPU staging and cancellation 2026-10-14 00:45:43 +02:00
vistaero 0456bc3f22 Add guarded scratch storage with owned memory supervision 2026-10-14 00:45:24 +02:00
webdevtodayjason 0ac13b43c8 Merge remote-tracking branch 'upstream/main' into pcx-runs-across-planes
# Conflicts:
#	contributors/people.toml
2026-10-13 17:41:13 -05:00
David MannandClaude Opus 5.5 1e076433dc PSD save: choose PSB by the encoded size, not the raw estimate (#5285)
Root cause: the auto-PSB switch (#212) decided before encoding, from
estimate_psd_size: the uncompressed size of every layer, mask and merged
plane plus fixed overheads. Channels are then RLE-packed, so documents
whose PSD would be far under the 2 GB limit (a 2.02 GB "raw" document
written as a 1.75 GB file, or a 35 MB file from 2.2 GB of flat layers)
were saved as PSB. The Multichannel writer used the same estimate.

Change: the document is encoded as PSD (PSB only when forced or past
30000 px) and the decision is made on the exact length of the file that
will be written. PsdFile::encoded_len computes what to_bytes writes
without serializing the pixel data. When it is over the limit,
PsdFile::promote_to_psb turns the model into the equivalent PSB in place:
the packed RLE rows are the same in both versions, so only the row-count
tables widen from 2 to 4 bytes (length fields widen on write). Nothing is
re-encoded and the result is byte-identical to a PSB written directly
(tested). The promotion is atomic: every stream is checked and its room
reserved before the first changes. The layer info is re-padded for PSB
and kept 8B64 block signatures are resolved after the version is final.
A 1 MB headroom covers the image preview the save adds afterwards.

The raw-size estimate is removed: the exact length is cheap (only the
layer records are serialized to measure them), so it no longer needs a
fast path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 00:21:58 +02:00
Nigel Ihza Firdausy 194a8976cd Merge pull request #18 from scottcampbelldata/fix/pr-4992-dissolve-coordinates
Fix clipped Dissolve coordinate types and verify region stability
2026-10-14 04:47:46 +07:00
Lorenzo Fasolino c09aff2517 Merge remote-tracking branch 'origin/main' into task/T-0001 2026-10-13 22:46:09 +02:00
Lorenzo Fasolino bc38bf15be Merge remote-tracking branch 'origin/main' into task/T-0003 2026-10-13 22:45:28 +02:00
scottcampbelldata bb6ad4c0d3 Fix clipped Dissolve coordinate types and verify region stability 2026-10-13 16:44:44 -04:00
augrclkandGPT-6 17f8f80b8c Brush Settings: align Angle and Roundness left of the tip widget
Put the numeric controls in a right-aligned left column and keep the
interactive ellipse on the right. Preserve units, limits, imported values
and existing field/drag command routing. Addresses only the Angle/Roundness
layout subsection of #3825.

Co-authored-by: GPT-6 <noreply@openai.com>
2026-10-13 23:41:12 +03:00
Fabio Lussi c45d01eafe Merge remote-tracking branch 'origin/main' into fix-3674
# Conflicts:
#	docs/control-protocol.md
2026-10-13 22:20:59 +02:00
Fabio Lissi 9db1c7ae1d Layer Style: Gradient Overlay takes any number of colour stops (#5177)
The Gradient Overlay page modelled its gradient as a From and To colour,
so a rainbow gradient on text, as in Photoshop, was impossible; richer
gradients only survived the dialog through the snapshot.

Engine: `layer.layerStyle.gradientOverlay` (and a gradient `stroke`) take
`"stops": [[position, "#rrggbb"], …]` (2..256, sorted) and
`"opacityStops": [[position, opacity %], …]` ([] = opaque), replacing
From/To. Malformed lists are refused at the command entry (set and replace),
so a bad edit changes nothing; given lists replace the gradient's, and
without them intermediate stops still survive an edit.

Dialog: the page shows a ramp with colour-stop markers edited as in the
Gradient Editor: click under the ramp to add a stop with the colour there,
drag to move, drag away to delete (two stay), double-click or the Color
swatch opens the shared Color Picker on that stop (`__openColorPicker
{stop}`, `ui.dialog.open {kind: colorPicker, field: "stops", stop: i}`),
Location and Delete for the selected stop, and the Gradients panel's presets
to start from. The page always writes `stops` and `opacityStops`; the factory
From/To defaults become two stops. Transparency stops are carried, not
edited on the page.

Tests: engine stops and refusals; the field grammar, the factory conversion,
ramp add/move/delete, presets and Delete, the picker's stop preview and
confirm, and the control channel.
2026-10-13 15:18:49 -05:00
vangel76 732293653f Merge remote-tracking branch 'upstream/main' into m4/x
# Conflicts:
#	crates/automation/src/server.rs
#	crates/engine/src/jobs.rs
#	crates/engine/src/paint_cmds.rs
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/smart_ui.rs
2026-10-13 22:04:09 +02:00
vangel76 2b3df66ff0 Merge remote-tracking branch 'upstream/main' into m/x
# Conflicts:
#	ATTRIBUTION.md
2026-10-13 21:55:40 +02:00
vangel76 1e4d41be0a Merge remote-tracking branch 'upstream/main' into m/c1 2026-10-13 21:54:21 +02:00
Gert Pellin 186dbfe4cd Merge branch 'feat/4814-psd-palette-modes' into feat/4814-duotone-inks 2026-10-13 21:47:44 +02:00
Gert Pellin f805b12a17 PSD: a flat Bitmap file saves in Bitmap mode and opens as a Background again
#3560's test expected the flat Bitmap file to be saved with a layer section.
With #4814 Bitmap is written in its own mode, which has no layers in
Photoshop: the test now checks the Bitmap header, the missing layer section
and that the saved file reopens with its Background.
2026-10-13 21:47:41 +02:00
Skyfuller1303 1eecd00b2d fix(vector): target selected saved paths and own Pen gestures
Path Selection, Free Transform Path, Direct Selection, Convert Point,
Add/Delete Anchor Point and the Pen's Auto Add/Delete now edit the work
or saved path selected in the Paths panel before the targeted vector
mask or active shape layer. Pen, Curvature Pen and Freeform Pen capture
their destination at the first anchor, keeping #4730's append to the
selected path.

Pen drafts, Direct Selection anchors and drags, Path Selection drags and
Freeform traces record document, revision and target; stale gestures
are cancelled and their late events consumed. Failed commits keep the
draft without retrying. path.set validates an appended path's complete
geometry before recording the edit.
2026-10-13 21:42:39 +02:00
skylartaylor 6c1a3590f5 Remove obsolete app-owned Windows printing layer comment 2026-10-13 21:33:44 +02:00
OctaNebula 51f3b1d4bf Merge branch 'fix/layer-style-resizable' into feat/layer-style-photoshop-layout
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
2026-10-13 21:32:29 +02:00
augrclkandGPT-6 fe083602a4 Brush Settings: place Both Axes on the Scatter header
Share the header layout between Scattering and Dual Brush, retaining label
scrubbing, percentage limits, fractional values and tools.setBrush routing.
Cover layout in all themes and guard disabled input and independent brush
blocks. Addresses only the Both Axes placement subsection of #3825.

Co-authored-by: GPT-6 <noreply@openai.com>
2026-10-13 22:29:15 +03:00
OctaNebula cde8de2dad Merge remote-tracking branch 'origin/main' into fix/layer-style-resizable
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
2026-10-13 21:27:16 +02:00
Florent Siegenthaler d306c539c9 Merge branch 'main' into fr-complete-catalog
Resolve the conflict in crates/ui-egui/src/i18n/fr.tsv: main's new rows are
kept as they are, and the branch adds only the keys main lacks (the duplicate
"Folder" row is dropped).
2026-10-13 21:21:06 +02:00
skylartaylor 235d4e22fa Merge current main while preserving native printing and system printer menus 2026-10-13 21:18:34 +02:00
abc2cbandClaude Opus 5.5 99b23f7007 PSD smart filters test: compare Wave's settings, not Photoshop's descriptor name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:15:35 +03:00