Commit Graph
11425 Commits
Author SHA1 Message Date
Nigel Ihza FirdausyandMarco Arnulfo 23dc83928c fix(ui): expose toolbar column toggle in all themes (#3538)
fix(ui): expose toolbar column toggle in all themes

Also covers the same fix as #4680; thanks to its author.

Co-authored-by: Marco Arnulfo <103679419+marcoarnulfo@users.noreply.github.com>
2026-10-14 15:05:06 -07:00
Sidney Markowitzandnrq6993-a11y d334d32c12 fix(heif): a grid's ICC profile is inherited from its tiles (#5553)
fix(heif): a grid's ICC profile is inherited from its tiles

Also covers the same fix as #5591; thanks to its author.

Co-authored-by: nrq6993-a11y <342501791+nrq6993-a11y@users.noreply.github.com>
2026-10-14 15:04:55 -07:00
Sir Clangington III.andLabDennis 914d51f9bb perf(ui): bound carried selection outlines and stabilize clipping (#5699)
Limit whole-selection transform traces to a padded one-million-cell grid
while preserving normal viewport caching and thin boundary samples.
Use double-precision intermediates for clipping long perspective lines.

Add regressions for large/disconnected selections and viewport accuracy
near the projective horizon. Preserve the full-resolution selection and
the transform behavior already landed in #5337.

Related: #5297, #3402.

Co-authored-by: LabDennis <341377186+LabDennis@users.noreply.github.com>
2026-10-14 15:04:45 -07:00
David MannandClaude Opus 5.5 45ddb5b2f9 Merge main into fix/psd-size-encoded
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:04:40 +02:00
Vikram BhaskaranandZer0C00L01 0f8c1a4106 Curves: apply to masks, alpha, and Quick Mask (#5335) (#5448)
Curves: apply to masks, alpha, and Quick Mask (#5335)

Also covers the same fix as #5578; thanks to its author.

Co-authored-by: Zer0C00L01 <12090083+Zer0C00L01@users.noreply.github.com>
2026-10-14 15:04:37 -07:00
optimalbyteeandoptimalbytee 0e15fe77f7 Fix Nikon NEF lossy levels, packed decoding and metadata crops (#3238)
Co-authored-by: optimalbytee <optimalbytee@users.noreply.github.com>
2026-10-14 15:04:27 -07:00
Michael HigginsandClaude Opus 5.5 7e94c507e9 Smart Objects: Curves preview no longer zooms in on a reduced proxy (#5766) (#5779)
Adjustments and filters on a smart object add a smart filter, so their live
preview re-renders the smart object from its source through its placement.
The preview runs on a proxy document scaled down by k (large documents), and
proxy_document scaled the smart object's cache but left its transform (and
perspective and filter mask) in full-size document coordinates. The re-render
then came out k times too large on the proxy canvas, so the object looked
zoomed in until OK committed the full-size result.

proxy_document now scales the placement and the filter mask with the proxy.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:04:19 -07:00
David Mannandnrq6993-a11y 772dfb9e7e Options bar: Brush and Eraser size go to 5000 px in every theme (#5708) (#5709)
Options bar: Brush and Eraser size go to 5000 px in every theme (#5708)

Also covers the same fix as #5724; thanks to its author.

Co-authored-by: nrq6993-a11y <342501791+nrq6993-a11y@users.noreply.github.com>
2026-10-14 15:04:09 -07:00
FinnNkandClaude Opus 5.5 2807deb209 fix(psd): write the layer block after a kept merged-transparency marker (#5673)
A 16/32-bit document saved as PSD has its layers in a global Lr16/Lr32 block, which the writer put first among the global blocks. A Mtrn/Mt16/Mt32 marker kept from the opened file then followed it, and Photoshop refuses such a file (verified in Photoshop 2026 with psd-tools' transparentbg.psd re-saved both ways: Mt32 first opens, Lr32 first doesn't). The layer block now goes right after the last kept marker, as Photoshop orders them. Fixes #5068.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:03:59 -07:00
David MannandClaude Opus 5.5 1025914b0e Properties / New Document: tiny sizes in physical units no longer resize the document (#5661) (#5662)
The Width/Height fields in Properties > Document and in the New Document
dialog clamped their shown value to at least 0.01 of the unit. A 1 x 1 px
document at 300 ppi is 0.0033 in, so showing it in inches clamped it to
0.01 in, the field reported a change and the document became 3 x 3 px
(two history steps, no user edit). The fields now accept down to 0; the
pixel conversion afterwards already clamps to at least 1 px.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 15:03:50 -07:00
David Mannandnrq6993-a11y d8d592b1bb FITS: clamp 32-bit saves to 0..1 and warn, so they reopen as saved (#5627) (#5628)
FITS: clamp 32-bit saves to 0..1 and warn, so they reopen as saved (#5627)

Also covers the same fix as #5642; thanks to its author.

Co-authored-by: nrq6993-a11y <342501791+nrq6993-a11y@users.noreply.github.com>
2026-10-14 15:03:42 -07:00
9a905959ed fix(linux): install the AppImage menu entry when AppImageLauncher skips it (#5551)
AppImageLauncher exports DESKTOPINTEGRATION even after
X-AppImage-Integrate=false makes it skip the AppImage. AppRun treated that
variable as "already integrated" and wrote no .desktop file, so the menu
stayed empty. Skip our entry only when another .desktop file's Exec already
points at this AppImage.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: nrq6993-a11y <nrq6993-a11y@users.noreply.github.com>
2026-10-14 15:03:32 -07:00
Skyfuller 9cc8be4392 fix(algo): keep clipped warp bounds from overflowing (#5451)
warp() computed the source-centre fallback as (x0 + x1) in i32 and the
inverse-mapped tile footprint as `floor() as i32 - 3` / `ceil() as i32 + 3`.
With a strongly skewed finite affine (for example Homography
[1, 1e12, 0, 0, 1, 0, 0, 0, 1] on a 32x32 clip) the float-to-int cast
saturates at i32::MIN/MAX and the following -3/+3 overflows, panicking in
debug builds and wrapping in release. A source rect with coordinates near
1.5e9 would overflow the centre sum the same way.

Widen the centre sum to f64 and use saturating_sub/saturating_add for the
footprint, which is intersected with src_rect afterwards anyway.

Add crates/algo/tests/warp_clipped.rs covering clipped-vs-full equivalence,
huge scale allocation, the extreme-affine footprint, and the far-origin
source centre.

Refs #3446
2026-10-14 15:03:24 -07:00
Saad AbdullahandSaad Abdullah e1706507b5 fix(geom): clamp huge sizes in Rect::from_xywh instead of wrapping, and saturate TileCoord::rect (#5161)
Co-authored-by: Saad Abdullah <saadkhantareen@users.noreply.github.com>
2026-10-14 15:03:16 -07:00
MarekSpodBiedry f1d13ca9c7 fix(ui): keep the close prompt up when a Save Document script edits the document after saving (#4953) (#5081) 2026-10-14 15:03:07 -07:00
MarekSpodBiedry dbfe8ba412 fix(history): count fill caches and smart filter masks in undo memory (#4972) (#5075) 2026-10-14 15:03:00 -07:00
MarekSpodBiedry 686f3ee944 fix(raw): reject truncated or oversized Deflate tiles in DNG import (#4977) (#5072) 2026-10-14 15:02:52 -07:00
mroxsoandhighperfocused 57d488032c fix(doc): variable definitions follow layer id remapping on copy and load (#5023)
* fix(doc): variable definitions follow layer id remapping on copy and load

A duplicated document (image.duplicate, history.newDocument) or a .pcraft
loaded with remapped ids assigned fresh layer ids but cloned VariableDef.layer
unchanged, so datasets silently drove no layer (or, after remap, a colliding
one). Remap variable targets through the same id map as layer comps and
slices; a dangling target keeps a non-colliding placeholder. A merged-only
duplicate drops the whole variable binding set, matching how it drops comps.

Closes #4969

* style: cargo fmt duplicate_variables test

---------

Co-authored-by: highperfocused <highperfocused@pm.me>
2026-10-14 15:02:43 -07:00
Nigel Ihza Firdausy 4c8101b576 fix(ui): avoid overflow when allocating layer style instance IDs (#4884)
* fix(ui): avoid overflow when allocating layer style instance IDs

* fix(ui): avoid panicking when layer style IDs overflow

* fix(ui): format non-panicking layer style ID allocation
2026-10-14 15:02:35 -07:00
Nigel Ihza Firdausyandbuivanvu94 13f893f998 fix(export): prompt for a Render Video output directory (#3365) (#3378)
fix(export): prompt for a Render Video output directory (#3365)

Also covers the same fix as #3390; thanks to its author.

Co-authored-by: buivanvu94 <125793064+buivanvu94@users.noreply.github.com>
2026-10-14 15:02:27 -07:00
Nigel Ihza Firdausy 5c78d0848f fix: limit Render Video timeline and GIF staging allocations (#5670) 2026-10-14 15:02:17 -07:00
Valentin KleinandClaude Opus 5.5 bcaadccbfa Vector: bound flattening memory, keep over-budget dashes, cheaper edge build (#5195) (#5204)
* Vector: bound flattening memory, keep over-budget dashes, cheaper edge build (#5195)

- flatten: a path's flattened points are capped at 1 << 20; past it every
  curve keeps a proportional share of its pieces (at least one), so hostile
  handles from files (vmsk, SVG, effect outlines) cannot exhaust memory.
  fill_rasterizer flattens the whole path under one budget.
- stroke: past the dash step budget (or below coordinate precision),
  dash_polyline keeps the dashes made so far and draws the rest solid
  instead of dropping the stroke. Open polylines are no longer copied.
- raster: coordinates are clamped to +-1e15 and edges with a non-finite
  slope (vanishingly short) are skipped, so huge finite coordinates no
  longer produce NaN coverage. fill_rasterizer sorts edges once instead of
  after every component (stable sort, identical order).
- Cleanups: dead miter `half`, dead loop-length check in trace_mask,
  shared mask render body, map_knots helper, shared straight-segment test.

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

* Vector: bound stroke outline points (#5211)

- stroke_polygons dashes all lines first, then counts round caps and
  joins. When their full-resolution tessellation would exceed 1 << 20
  outline points, every round cap and join gets the same smaller segment
  count (down to 4 per circle, 1 per join; area-exact radius kept).
  Strokes under the budget are unchanged; no piece is dropped.
- The dash step budget (100000) is now shared by all lines of a stroke
  instead of per polyline, so many subpaths cannot multiply the dash
  (and cap) count. Past it the rest is drawn solid, as before.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:02:09 -07:00
Finn NewickandClaude Opus 5.5 fbaf6795cf refactor(engine): drop the second damage pass after single-edit duplicates and pastes
Session::edit has reported a new layer's bounds as damage since #3847, so
Duplicate Layer, Duplicate Layers and Paste no longer need to keep the
document from before the edit and work the damage out again with
note_insert. Paste Into still does: it is three edits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:50:34 +01:00
Gustavo Ziger 6bb3130a4c fix: update zoom interruption for wheel navigation 2026-10-14 18:34:13 -03:00
Higgs32584andClaude Opus 5.5 a43f8b5ece Auto-Blend Layers: blend a layer the canvas crops to all-overlap (#5745)
Panorama seams skipped an image lying wholly inside the composite, so after
Auto-Align moved the second photo partly off the canvas it got an all-black
mask and nothing changed. Such an image now takes the side of the seam it
lies towards; blending covers the layers past the canvas; Seamless Tones and
Colors evens out exposure; the Background becomes a layer to take its mask.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:25:06 -04:00
David MannandClaude Opus 5.5 667a14d945 PSD Multichannel: alpha channels are stored as-is, not as ink (#5790)
A Multichannel PSD stores ink planes as tone (0 = solid ink), but the
planes DisplayInfo (1077) marks as alpha-type (kind 0/1) are stored as-is,
like alpha channels in every other mode. Import inverted every plane and
export wrote every channel inverted, so a white (selected) alpha imported
as 0 and RGB -> Multichannel -> save wrote alpha channels black.

Measured with a file Photoshop saved itself: a new 8x4 8-bit white RGB
document plus a "selected areas" alpha channel, white left half / black
right half, converted to Multichannel and saved as PSD. Merged planes:
Cyan, Magenta, Yellow = 255 everywhere (ink-inverted: no ink on white
paper); alpha = 255 255 255 255 0 0 0 0 per row (as-is, 255 = selected).
DisplayInfo kinds: 2, 2, 2, 0.

- io: after DisplayInfo, flip alpha-type channels back; on export invert
  only spot channels.
- compose: an alpha-type channel prints as black ink of 1 - value, so the
  composite of a Multichannel file is unchanged.

Tests: a kind-0 alpha imports as stored (white = 1.0) with the spot plane
still read as ink, the composite and the byte-for-byte round trip hold
(8 and 16 bit); a full alpha exports as a max plane next to a solid ink
stored 0. The #4031 composite check now compares against a black ink of
the inverted alpha, within f32 rounding; the compose unit test uses the
as-is polarity for its alpha channel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 23:20:06 +02:00
David MannandClaude Opus 5.5 5781847da3 Paint: Lock Transparency blends source-atop on semi-transparent pixels (#5783)
With alpha kept (Lock Transparent Pixels, Fill's Preserve Transparency),
the brush, mixer, Fill, Gradient and Paint Bucket composited source-over
and then restored the old alpha, so a half-transparent pixel took the new
colour by as / ao instead of as. They now blend source-atop, as Photoshop
does: Co = (1-as)*Cb + as*B(Cb,Cs), alpha unchanged. New shared helper
blend::composite_atop; over_native's lock branch lerps by the source alpha.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 23:15:43 +02:00
David MannandClaude Opus 5.5 d5056fc5bf Channels: CMYK channels duplicate, load, split and merge as tone, not ink (#5787)
CMYK pixels are stored as ink (1 = full ink), but the Channels panel and
Photoshop show a CMYK channel as its tone (white = no ink). The engine
copied raw ink, so on a white CMYK document Duplicate Channel of Cyan made
a black alpha, Load Selection from Cyan selected nothing, Split Channels
made black grayscale documents, Merge Channels of white documents made a
black CMYK image, and channel copy/paste was inverted.

A small `tone(mode, v)` helper (1 - v for CMYK, its own inverse) now reads
a CMYK colour channel as tone in ref_planes (Duplicate, Load Selection,
Calculations, Apply Image sources), Split Channels and channel copy, and
writes tone back as ink in Merge Channels, channel paste and Apply Image of
a single plane onto a CMYK layer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 23:15:20 +02:00
vangel76andClaude Opus 5.5 5f83b53a32 Type: keep superscript and subscript (FontBaseline) when a text layer is re-rendered (#5645)
CharStyle had no superscript/subscript attribute, so PSD import ignored FontBaseline and the first re-render (entering text editing) drew the run as plain text. Model it as CharStyle::baseline, read and write FontBaseline in EngineData, draw such runs at 58.3% of their size shifted by 33.3% of it (Photoshop defaults), and accept "baseline" in the character params.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:13:41 +02:00
abc2cbandClaude Opus 5.5 4499458d32 Merge Layers Panel part 1 (main 8d840eab) into codex/fill-mask-preview-20261012
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:09:07 +03:00
abc2cbandClaude Opus 5.5 5cc5a9ed13 Merge Layers Panel part 1 (main 8d840eab) into codex/layers-subrow-scaling-20261012
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:09:03 +03:00
nrq6993-a11yandCursor c71f951b90 Fix View › Snap off still snapping via smart guides (storytold/photocraft#5782).
Smart-guide targets were built even when the master snap switch was off; gate them on snap_on like other targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-15 00:06:16 +03:00
abc2cbandClaude Opus 5.5 a40b95f250 Merge upstream/main (8d840eab) into Layers Panel options
Main landed Clip Thumbnails to Layer Bounds (#4281, #4312), the same
setting as this PR's Panel Options › Thumbnail Contents, and the Layers
panel filter-type dropdown (#5048, #5268):

- Thumbnails use main's frame and cache (layer_thumb, thumb_image); this
  PR's own Layer Bounds region code is gone. The Panel Options dialog's
  Layer Bounds / Entire Document now shows and sets
  interface.clipThumbnailsToLayerBounds, which the panel menu's checkbox
  toggles too, so the two can't disagree; it is no longer saved with the
  panel options.
- Filter Options › Show hides main's new filter bar.
- Catalogs keep main's hu/sr/tr/vi rows and this PR's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:03:05 +03:00
Claude 0981fd79d3 Warp commands take a cylinder; docs for #4112
- `edit.transform.warp` / `layer.smartObjects.warp`: `style: "cylinder"`
  with its seven `values` (document px; depths in half axes), or a full
  `warp` object whose mesh is rebuilt from its values. Anything that
  isn't a horizontal cylinder without distortion is refused, never a
  silent no-op; on type it is refused like a custom mesh.
- On a smart object the cylinder is stored in source space: still a
  cylinder (so it goes to PSD as one) when the placement only scales and
  moves, its mesh as a custom warp otherwise.
- docs: file-format-parity (PSD row, history) and gaps G1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuC9R3K5QeMBrDkixa1jnt
2026-10-14 20:59:02 +00:00
abc2cbandClaude Opus 5.5 d16b4f7302 Merge upstream/main (8d840eab) into Smart Filters editors
Resolve smart_ui.rs: a Filter Gallery smart filter opens main's gallery
window (#3426) before this PR's editor routing; catalogs keep main's
hu/sr/tr/vi rows and this PR's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:58:05 +03:00
timothydaly1andClaude Opus 5.5 2493eab205 Hue/Saturation: 32-bit saturation isn't clipped, its slider on whole levels
Photoshop's 32-bit Hue/Saturation raises the saturation by 1 / (1 - s)
like 8/16 bits, but doesn't clip it at 1: saturated colours leave 0..1
(the photoshop corpus's rgb32 hue-saturation.psd, Hue +40, Saturation
+25, Lightness -10, takes red to (1.0477, 0.649, -0.1477), where 8 bits
clip it to (0.9, 0.6, 0)). Its slider is cut to whole 8-bit levels: 25 %
raises by 1 / (1 - 63/255) = 1.328, not 1/0.75; in-gamut colours show
the same factor. The file becomes exact (0.1477 -> 0.0002).

hue_saturation_in carries the depth; the GPU kernel does the same under
F_HDR. Photoshop oracles 186 -> 187 (with the Colorize change, 185 ->
187), floor 187.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:57:16 -04:00
Davit MatchakhelidzeandClaude Opus 5.5 000043eefb i18n(ka): bring the Georgian catalog up to date
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:55:16 +04:00
Davit Matchakhelidze 5ecedce2a6 Merge upstream main into ka-language 2026-10-15 00:55:15 +04:00
vangel76andClaude Opus 5.5 0649a83bf5 Merge upstream/main into fix/vp-stamp-tearoff
Clean merge (#3133 is merged upstream). Regenerate docs/scorecard.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:51:57 +02:00
timothydaly1andClaude Opus 5.5 e41bc273fe Hue/Saturation: a 32-bit Colorize scales its saturation by 1 - |Lightness|
Photoshop's 32-bit Colorize builds its colour with less chroma than the
8/16-bit one: in the photoshop corpus's rgb32 hue-saturation-colorize
(hue -160, saturation 40, lightness +5) every output has the same hue
and lightness as ours but exactly 0.95 of the chroma, at every input
lightness from black to white. Scaling the saturation by 1 - |Lightness|
at 32 bits makes the file exact; 8 and 16 bits keep the full saturation
(their oracles are exact without it, and scaling there breaks them).
Only a raised Lightness is measured; a lowered one is taken to scale
the same way.

CPU (adjust::colorize_saturation) and the GPU planner alike. Photoshop
oracles 185 -> 186, floor 186.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:50:04 -04:00
Claude a4531d3122 PSD: read and write Photoshop's Cylinder warp on placed layers (#4112)
A `warpCylinder` placed layer was read as having no warp: it showed
Photoshop's cached pixels on open, but Replace Contents, Relink and Edit
Contents drew the contents flat, and a regenerated SoLd wrote warpNone.

- Import reads the seven `warpValues` (a list of doubles or unit floats)
  of a horizontal cylinder without perspective into Warp::cylinder.
  Vertical cylinders and ones with perspective, never measured, stay
  unreadable as before, as do broken values.
- Like a custom warp's (#3677), the cylinder's control-point box is what
  the placement quad frames, for affine corners and, new for this style,
  projective ones (`nonAffineTransform`): perspective_frame and
  corners_perspective_in. Custom warps keep the source rect there.
- Export writes `warpCylinder` with its values back and frames the same
  box, so a moved or replaced layer reopens where it was. An unchanged
  layer is still written verbatim.

Tests: synthetic SoLd parsing (both value encodings, the refused
variants), the quad framing the control box (affine and projective),
SoLd and PlLd round trips, and a PSD export/import whose re-render
hides the contents wrapped round the back (fails before the change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuC9R3K5QeMBrDkixa1jnt
2026-10-14 20:48:54 +00:00
vangel76andClaude Opus 5.5 47299e45af Merge upstream/main into feat/4391-contour-library
Keep both sides in commands.rs, lib.rs and the workspace sandbox list. Drop stale duplicate ja/hu rows left by the tsv union, add the contour strings to the new sr.tsv catalog, regenerate docs/scorecard.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:48:49 +02:00
vangel76andClaude Opus 5.5 3c09d89e0d Merge upstream/main into fix/3290-filter-mask-paint
Resolve UI_SET_FIELDS (filterMaskTarget + upstream's layerFilter = 38). Name layerFilter in the MCP ui_set description, which upstream's mcp test requires. Regenerate docs/scorecard.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:48:04 +02:00
abc2cbandClaude Opus 5.5 914e40d29e Merge upstream/main (8d840eab) into PSD distort/Invert smart filters
Resolve docs/file-format-parity.md: keep main's corpus floors and Filter
Gallery note next to this PR's 22 mapped smart filters and history row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:47:18 +03:00
vangel76andClaude Opus 5.5 9303c10bb6 Merge upstream/main into fix/3490-move-align-bar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:44:23 +02:00
timothydaly1andClaude Opus 5.5 06d38bce12 Lab: adjustment results are whole samples, as Photoshop stores them
The native Lab path (compose::native_lab) worked a stack out on the
stored L, a and b but kept each adjustment layer's result unrounded, so
the screen showed values between two samples where Photoshop, which
stores every result at the document's depth, has whole bytes (or
1/32768 steps). On saturated colours half a byte of L is a couple of
RGB levels. Each adjustment's result is now rounded to the depth's
samples (adjustment_quantum: 8 and 16 bits; 32-bit stays unrounded),
as the RGB compositor already does.

photoshop lab8 curves.psd goes from 0.0084 to exact (PASS); Photoshop
oracles 185 -> 186, floor 186. lab8 brightness-contrast (modern) stays
DIFF: our modern curve is within half a byte of Photoshop's on L, not
exact, so rounding now shows its misses (0.02 % -> 1.05 % of pixels).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:36:27 -04:00
David MannandClaude Opus 5.5 bb7c84f997 Fill layers: reject non-finite gradient angles and pattern angle/phase (#5752)
layer.newFillLayer.gradient and gradient.presets.apply cast `angle` to f32
unchecked, so 1e39 stored an infinite angle (NaN render, .pcraft save
refused) and 450 stayed 450. They now share gradient.fill.set's parsing:
non-finite is BadParams, the angle is normalised to (-180, 180].
Pattern placement (Pattern Fill layer, Edit > Fill, Paint Bucket) does the
same for its angle and rejects a phase outside +/-1e7 like pattern.fill.set.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 22:34:51 +02:00
Claude d709fd81a1 Warp: Photoshop's Cylinder warp as a 4 × 1 patch mesh (#4112)
Transform Warp's Cylinder (`warpCylinder`) stores seven `warpValues`
instead of a bend. WarpStyle gains Cylinder (parsed, named, not one of
the fifteen bend presets and not listed in the Warp menus yet), and
Warp::cylinder builds its mesh: four patches across (back, front left,
front right, back) and one down, in the warp's value space like a
custom mesh, so map, to_mesh and is_identity treat it as one. Warp keeps
the values for writing them back (serde: omitted when empty).

The model and its table of shape factors were measured against
Photoshop 2026's renders by the reporter of #4112 (not from Adobe's
code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuC9R3K5QeMBrDkixa1jnt
2026-10-14 20:33:52 +00:00
NibrasAz7 04257959b3 i18n(ar): Arabic UI language with bidi display order
Add an `ar.tsv` catalog (~1,020 rows covering menus, Camera Raw, brush
and LUT strings, 24 six-form plurals per CLDR `ar`), a `bidi` module on
`unicode-bidi` that puts catalog text into display order at load time
(`map_translations`) and reorders user-authored names at paint sites
(document tabs, recent files, preset/gradient/style/composition names,
custom channel labels). Chrome already mirrors via `dir_for_code("ar")`;
the language resolves from prefs and `ar-*` locales.
2026-10-14 22:23:50 +02:00
Finn NewickandClaude Opus 5.5 0351f635d7 perf(doc): share the XMP packet, Duotone PSD data and unsupported adjustment bytes between snapshots
Every edit clones the document and history keeps one per state. Metadata.xmp (String), Duotone.psd_raw (Vec<u8>) and Adjustment::Unsupported.raw (Vec<u8>) were owned, so each copy duplicated them, uncounted; their siblings (EXIF, PSD resources and blocks, a layer's psd_raw) were already Arc. They are now Arc<str> and Arc<[u8]>. Reads are unchanged (Arc<str> derefs to str); the boundaries to the codecs, the .pcraft manifest and the PSD model convert once per file operation. The architecture's snapshot principle now states the rule for every large payload, and a test checks that a history state shares all three. Fixes #4535.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:08:33 +01:00