* Raw: measure the Nikon D90 image area (4288x2848 at (10, 10)) Aligning the decoded D90 sensor plane with the camera's own JPEG puts the image at (10, 10) in the 4352x2868 sensor plane, giving the camera's 4288x2848 frame (10-pixel margins; the right border reads the camera's flat 255 from column 4310). Add the measured ImageArea so a D90 NEF opens on the camera's frame instead of the uncropped plane, and make a measured profile leave a file that carries its own colour calibration (a DNG) untouched. * Codecs: open Cineon (.cin) film frames read-only Cineon is the 10-bit logarithmic film-scan format DPX grew from. Read it from the same Kodak header family: the generic header (big-endian, orientation at 192, channel count at 193, the channel-1 bits/dimensions), one or three channels, three 10-bit samples packed into each 32-bit word on a word boundary. The 10-bit code values open as U16 (round(c x 65535 / 1023)); the file's log black/white points are a display choice and are not applied. A depth other than 10 bits or a channel count other than 1/3 is Unsupported; truncation errors rather than panicking. Read-only (no Cineon writer), so .cin joins the open filters and Cineon read closes part of #1049's G10 gap. * .kys import: tool keys and sets saved on Windows (K3) Photoshop's <tool> rows now import: each matches our tool by name (our tool names are Photoshop's) or by pc-id in sets PhotoCraft exported, and a letter other than the tool's own becomes its override, while its own letter keeps the tool cycling with the others (#5036). A set saved on Windows spells the primary modifier Ctrl where a Mac set writes Cmd and keeps Control for the Control key. A set with no Cmd or Opt anywhere but some Ctrl is read as a Windows set, its Ctrl as our Cmd: Ctrl+L is the Cmd+L default, not a Control-key override that would also mean Control on a Mac. The import reports `windows`. * 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 <[email protected]> * 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 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * fix: limit Render Video timeline and GIF staging allocations (#5670) * 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 <[email protected]> * 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 * 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 <[email protected]> * fix(raw): reject truncated or oversized Deflate tiles in DNG import (#4977) (#5072) * fix(history): count fill caches and smart filter masks in undo memory (#4972) (#5075) * fix(ui): keep the close prompt up when a Save Document script edits the document after saving (#4953) (#5081) * fix(geom): clamp huge sizes in Rect::from_xywh instead of wrapping, and saturate TileCoord::rect (#5161) Co-authored-by: Saad Abdullah <[email protected]> * 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 * 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 <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> * 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 <[email protected]> * 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) <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Fix Nikon NEF lossy levels, packed decoding and metadata crops (#3238) Co-authored-by: optimalbytee <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Double-clicking the empty workspace shows File › Open (#5367) (#5429) Double-clicking the empty workspace shows File › Open (#5367) Also covers the same fix as #5461; thanks to its author. Co-authored-by: Nigel Ihza Firdausy <[email protected]> * fix(ui): a held arrow key keeps stepping the focused value field (#5474) (#5497) Holding Up/Down in a value field (Character panel tracking, size, …) stepped it a couple of times, then jumped focus to the field above. Each arrow step re-requested focus on the field that already had it. egui's request_focus resets the field's event filter, so on the next frame egui no longer knew the field takes vertical arrows. A key repeat landing on that frame was read as "move focus up". Single presses rarely hit that frame; held keys always do. Only request focus when the field lost it (after a typed sum gives it up to be worked out). Regression test feeds key repeats on consecutive frames with a field above and failed before the fix (focus moved after two steps). Fixes #5474 Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(ui): ⇧ marquee square keeps equal sides on the pixel grid (#5472) (#5506) The ⇧ square (and a 1:1 fixed ratio) is built in continuous document coordinates, and `marquee_px` then snapped each axis to the pixel grid on its own: floor the near edge, ceil the far one. A press between pixels, dragged 100.5 px, snapped x to 101 and y to 102, so the readout and the committed selection were off by one. `marquee_preview_px` now grows the shorter side to the longer one, away from the press point, so the square still covers every pixel the drag touched. Ants, readout and commit share this path. Fixes #5472 * fix(engine): validate bounded extended filter parameters (#5586) * Guide Layout: the disabled Rows field no longer turns Rows on (#5625) (#5626) The disabled Number field still drew a DragValue with range 1..=1000, which clamps the default rows 0 to 1 and reports a change; writing that back made the Rows checkbox's `positive` fallback turn on, so OK added guides at the top and bottom. Disabled number fields no longer write back. Kittest regression covers Rows and Columns. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Fix filter preview live during drag (#5549) * Filter dialogs: paint the preview computed mid-drag instead of waiting for the pointer to stop A preview that finished while the slider was still moving was thrown away before it could reach the canvas, because the worker result had to match the request on every field including the parameters. Every completion of a drag lands after the value has moved on, so none of them matched, the worker was handed the newest value instead, and that one went stale in turn. Nothing was ever painted while the pointer moved: the effect appeared only once the slider had been still for about a frame of preview time, which is what "I have to stop the slider and wait" looks like. The display gate a few lines below already had the opposite rule. It compared the document, revision, dialog, layer, channel target, command and proxy factor and deliberately left the parameters out, so that a slightly old frame stays on screen mid-drag. The publish gate disagreed with it and won, so the frame the display gate was written to keep never existed. Publish a successful result when the finished request matches the current one on everything except the parameters, and let the existing display gate decide whether to keep it. The two gates now share one predicate, FilterPreviewKey::same_target, so they cannot drift apart again. Errors keep the exact match. A value the pointer has already dragged past should not raise a notice, and a failure is not something to show stale. What this deliberately does not change: - A reopened dialog has a new id, a committed document a new revision, a different command or channel target a different key, so a result from another preview is still never painted. Covered by a_reopened_dialog_discards_the_previous_dialogs_finished_preview. - The freshly computed request is still what decides whether a new computation starts, so the worker still converges on the value the dialog actually holds. - One preview runs at a time and a stale one is still cancelled only once the values settle, so this adds no work to the worker; it only stops discarding completed work. - OK still recomputes at full resolution, so a frame shown mid-drag is never what gets written to the document. Test: a_preview_computed_mid_drag_reaches_the_canvas starts a blur at one radius, moves the slider before that preview lands, and requires the completed frame to reach the canvas while the slider is still on the new value. It fails on the old gate, timing out after 10 s with no frame published. * Filter dialogs: three guards on a mid-drag preview, after review The first version of this let any completed frame through that matched the dialog on everything but the parameters. Review found three ways that is wrong, and all three are now closed and pinned by a test. A stale result with nothing to show. Storing it replaces a good frame with an empty one, which the display gate paints as "draw nothing": the canvas blinks back to the unfiltered layer mid-drag. The exact request may still store an empty result, which is how a filter that no longer applies clears the canvas, so the guard belongs on the stale arm only. Splitting the match arm is what makes that separable; the earlier single arm forced a false choice between the two. A late frame replacing an exact one. Drag the slider away and straight back: the frame on screen is already exact for the dialog, and the in-flight frame for the value on the way out would have overwritten it, showing a blur the user has already undone. A stale result is now dropped when the stored preview is already exact. Errors were already scoped to the exact request and stay there: a value the pointer has dragged past should not raise a notice, and the value it comes to rest on will raise its own when it is recomputed. Also pinned by test, because both are easy to undo by accident: - The reopen test was not reaching the gate. discard_closed reclaims a closed dialog's job a frame earlier in the real app, and the test called it too, so the stale result never arrived and the test passed even with the dialog id removed from the comparison. It now drives the gate directly. Verified by mutation. - The mid-drag test asserted nothing about what the display gate does with the published frame, so re-adding params there passed. It now asserts the canvas actually returns something to draw, and it keeps polling until a frame for the dialog's current value lands, which is what pins fresh to an exact match. Tests are deterministic: the worker job is gated on a channel and signals when its result is already in the worker channel, so nothing sleeps and nothing races the 150 ms settle timer that cancels a job whose values stopped changing. Verified by mutating each guard and confirming a test catches it: publish gate back to exact-match ................. killed drop the is_some guard ........................... killed drop the already-exact guard .................... killed same_target ignores the dialog id ............... killed display gate compares params again .............. killed fresh relaxed to same_target .................... killed same_target ignores k ........................... killed k stays in the comparison on purpose. A 36 MP document previews at k=4, and preview_factor lowers k as a pixel-sized parameter approaches its minimum, so k does change under the slider. Relaxing it would paint a frame at a scale the preview policy exists to avoid, and would loosen the display gate further than upstream wrote it. The cost is a one-computation pause when the slider crosses a threshold on a large document; that test keeps the choice visible. * Filter dialogs: fix a race in the new tests that let CI pass them The four new tests signalled each other through a channel the worker sends from inside `compute`. But the worker only puts the result into the channel after `compute` returns: let result = compute(&work); let _ = tx.send(result); So a test that woke on the signal and called `ensure_filter_preview` immediately could reach `poll()` before that send. On a loaded CI runner it did: ubuntu failed `a_mid_drag_empty_result_leaves_the_preview_alone` with no frame published at all. The comment in the test claimed the result was already in the channel, which was the one thing it was not. The tests now drive the canvas until the state they need appears, which does not depend on the order of that send. They also check their invariant on every pass rather than only at the end: a wrongly published frame can be replaced by the next, correct one before the loop stops, which had already left the reopen, late-frame and empty-result tests unable to see their own mutation. Unchanged: the assertions, the production code, and the four mutations that broke each guard — re-verified, 7 of 7 still caught. Runs: 30 back-to-back runs of the four tests on 12 cores, no failure; the full crate twice, 2800 pass. --------- Co-authored-by: agent-346022 <[email protected]> * Fix #5414: Keep created paths visible and editable (#5424) * Paths: keep work and shape paths visible with any tool (#5414) * Tests: improve path overlay regression coverage * fix(ui): widen tool-options drag targets (#5135) Co-authored-by: haranishi <[email protected]> * fix(cms): write the product name as PhotoCraft in built-in profile descriptions (#5614) * style: rustfmt five files on main (fmt break from #5448, #5670, #5135) (#5873) Formatting only; cargo fmt --all -- --check passes again. * cargo fmt the extension lists Co-Authored-By: Claude Opus 5.5 <[email protected]> * Document layerFilter in the ui_set MCP schema (#5776) Co-authored-by: FredApps <[email protected]> * i18n(hu): align six rows with the catalog conventions (#5434) Three prompts used the formal verb form ("Adjon", "Válasszon", "kattintson"); the catalog addresses the user informally throughout. Two colour profile messages put an article before a placeholder ("A(z) „{name}”") and glued a suffix to one ("{mode}-profilja"). The correct form depends on the inserted value, so the placeholders now stand after a colon or in brackets. The Ask On Mismatch hint kept the English option name; it now names the Hungarian label of that option in Color Settings. * UI: centre text vertically in shared text fields (#5550) * UI: centre text vertically in shared text fields TextEdit draws its line at the top of its rect, and the theme's 24 pt interact height made the edit taller than the field's inside, so text in widgets::text_field sat a few pixels high (Preferences search, hex fields, name fields) while dropdowns and value fields were centred. Fill the box and centre the line in it. * Fixed failing test --------- Co-authored-by: Stevan Marjanović <[email protected]> * fix(ui): the Move tool keeps Photoshop's arrow pointer (#5814) The canvas cursor match mapped Tool::Move to CursorIcon::Move, the 4-way move cursor, while Photoshop shows its standard arrow pointer and marks the movable layer with the hover outline. Use CursorIcon::Default for the tool (#5646). * fix(pen): keep unfinished paths in their original document (#5460) * fix(pen): finish draft before creating a document * test(pen): keep open work path in its source document * Drag and drop: PhotoCraft comes to the front after a drop (#5687) (#5894) Files dropped from another app's window (a file manager) were imported, but the source window stayed in front of PhotoCraft. The frame that takes a drop now asks for focus, so PhotoCraft comes forward as Photoshop does. Co-authored-by: Claude Opus 5.5 <[email protected]> * Options bar: Show Transform Controls in every theme (#5740) (#5802) The Studio, Adwaita and Breeze themes' Move tool options bar had only Auto-Select and a hint, so Show Transform Controls could not be turned on there and a click on a layer never showed its box and handles. The toggle is now in every theme, as Auto-Select is (#1275). Co-authored-by: Claude Opus 5.5 <[email protected]> * Preserve Layers scroll per document (#5522) (#5540) * chore: reserve draft implementation for #5522 * fix(ui): retain each document's Layers scroll position (#5522) * Rulers: Alt-drag makes a guide of the other orientation (#5698) (#5885) As in Photoshop, dragging a guide out of the top ruler with Alt/Option held makes a vertical guide, and out of the left ruler a horizontal one; without Alt each ruler makes its own kind, as before. Co-authored-by: Claude Opus 5.5 <[email protected]> * Adjustment layers: a live preview is never coarser than the screen (#5764) (#5778) Dragging a Curves point (or any control) in the Properties panel of an adjustment layer previews through `canvas::ensure_proxy_preview`, which picked its downscale factor from the document size alone (`proxy::preview_factor`): any document over 5 MP was drawn from a 2-5x reduced copy at every zoom, so at 100 % the canvas turned blocky until the mouse was released. Cap the factor by the view's zoom with the rule the Image > Adjustments dialogs already use (`adjust_preview::proxy_factor`: the proxy stays at least at screen resolution) when the wgpu compositor can draw the full-size document. At 50 % and closer the drag now shows the full-size composite; zoomed out, the proxy still saves the work. Documents the GPU compositor doesn't cover keep the old proxy (the full size would be a CPU composite per change). Co-authored-by: Claude Opus 5.5 <[email protected]> * UI: unsaved-changes buttons show every key in one style (storytold/photocraft#5564) (#5603) German showed "Ja (Y)" next to "(N)ein". Keys now go inside the words only when every translated label starts with its key; otherwise all labels append it ("Ja (Y)", "Nein (N)", "Abbrechen (C)"). Co-authored-by: Cursor <[email protected]> * macOS: a bundled app keeps its own Dock icon (#5849) (#5879) The main window set a runtime PNG icon everywhere. On macOS that replaces the app bundle's PhotoCraft.icns in the Dock, so the system couldn't render it in its own style (Liquid Glass and its tinted and dark variants). The runtime icon is now skipped when running from an .app bundle; unbundled runs and the Windows and Linux builds still set it. Co-authored-by: Claude Opus 5.5 <[email protected]> * Title bar: dialogs no longer stop the window dragging on macOS (#5826) (#5860) The overlay that keeps the title strip's free gap draggable under a dialog's modal layer (#4913) only ran with the custom title bar. macOS keeps the OS traffic lights over the app's own title strip (custom_titlebar is false), so with the Embedded Profile Mismatch prompt or any dialog open the window could not be moved. The overlay now runs whenever the strip is drawn. Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(path): Shift locks a Direct Selection anchor drag to 45° (#5475) (#5498) Dragging selected anchors with the Direct Selection tool ignored Shift, so lengthening a slanted bar also nudged it vertically. As in Photoshop, Shift now locks the anchor move to multiples of 45° from the press, in the live preview and in the committed path.moveAnchors. It works whether Shift is held from the press or added during the drag; Shift at the press still toggles the anchor's selection as before. Reuses stroke_constraint::snap45 (the Gradient tool's Shift lock). Fixes #5475 Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> * Type: keep text selection highlight visible while Command/Ctrl is held (#5542) * Type: keep text selection highlight visible while Command/Ctrl is held * Type: match Photoshop 1px dark frame and handle styling for type transform * Merge main; keep the transform box and underline colours from the theme tokens The selection-highlight fix stands on its own; the hard-coded box and underline colours and the removed reference point were unrelated to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: safvanedge <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * Filter dialogs: a Random button for seeds (#5710) (#5886) Clouds, Difference Clouds, Add Noise, Fibers and the other seeded filters exposed a seed number, but a new pattern meant typing a different one. A Random button beside every seed field now picks a fresh seed, which the live preview renders at once. "Random" gains its row in the zh-Hans, zh-Hant, ru, fr and id catalogs, which claim complete coverage. Co-authored-by: Claude Opus 5.5 <[email protected]> * Brushes: dragging a preset to the list's edge scrolls the list (#5741) (#5862) A preset, group or folder dragged in the Brushes panel or the Brush Preset picker couldn't reach rows out of view: the list didn't scroll while dragging, so the drag stopped at the last visible row. Holding the drag at the list's top or bottom edge (or past it) now scrolls it, with the same ramp as the Layers panel's row drags. Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(ui): smart filter adjustments open their own editor on double-click (#5812) An Image > Adjustments recorded on a smart object (Brightness/Contrast, Levels, Curves...) stores image.adjustments.<kind>. The Layers panel row called smart_ui::open_editor, which only knew filter_dialog and silently did nothing for those commands, so the filter could never be reopened. Route adjustments to adjust_dialog, seed it with the recorded params and let OK run layer.smartFilter.setParams (#5689). * Canvas: no scroll glide with Enable Animations off (#5721) (#5883) Interface > Enable Animations off already made scroll areas jump straight to their target, but the canvas still panned from egui's smoothed wheel delta, gliding for several frames after each notch. With the preference off a plain wheel scroll now moves the canvas by the whole notch in the frame it arrives and stops there. Co-authored-by: Claude Opus 5.5 <[email protected]> * Scaling around reference point no longer snaps center of image to reference point (#5510) Co-authored-by: Stevan Marjanović <[email protected]> * Type: a scaled type layer keeps its size when the Character fields show it (#5717) (#5718) egui's DragValue clamps an existing value to its range and reports a change, so showing a type layer scaled past 1296 pt (or below 0.1 pt) sent type.setStyle with the clamped size. Value fields now clamp only edits, never a value they merely show. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * fix(ui): restore previous tool when committing or canceling text edit (#5527) (#5528) * fix(ui): restore previous tool when committing or canceling text edit initiated via double-click * fix(ui): restore return tool only while on type and stay on type for layer thumbs - commit_with/cancel: restore return tool only while app.ui.tool.is_type() - edit_active: keep tool on Type when editing from layer thumbnail (matches Photoshop) - clear text_edit_return_tool when text_edit is dropped on lost text or stale transform - test tool switch mid-edit and edit_active remaining on Type --------- Co-authored-by: safvanedge <[email protected]> * File › Scripts › Browse: reject Photoshop ExtendScript (#5406) (#5435) * File › Scripts › Browse rejects Photoshop ExtendScript. The picker listed .js/.jsx files that parse_script cannot run. Filter to JSON/text/droplet scripts and return a clear error for .js/.jsx paths. * File › Scripts › Browse keeps Photoshop extensions in the picker. Review feedback on #5435: filtering .js/.jsx out of the picker hid the rejection error from UI users. List Photoshop's script types (as #2452 asked) alongside PhotoCraft's so selecting one shows the ExtendScript error instead of hiding the file. * Channels: load the targeted layer mask as selection (#5562) * Load the targeted layer mask from Channels footer * Fix Channels test setup after mask reveal * Type: Swap and Default Colors recolour the selected text (#5690) (#5808) The toolbar's Switch Colors and Default Colors buttons ran their commands without type_tool::foreground_changed, so characters highlighted in the type layer being edited kept their colour. As in Photoshop, they now take the new foreground, like picking a colour in the Color or Swatches panel. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Image Size, Canvas Size: points and picas follow the Point/Pica Size preference (#5756) (#5757) The dialogs converted points and picas at a fixed 72 pt/in, while the rulers, Info, layer properties and the shape dialog use Preferences > Units & Rulers > Point/Pica Size. With Traditional (72.27) a document showed different point sizes in the rulers and in Image Size. The dialog now stores the preference's points per inch when it opens (__ptPerIn, 72 when missing) and uses it for points, picas (points / 12) and typed units in the Width/Height fields. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Pen and Path Selection: Delete deletes the finished work path (#5702) (#5732) A finished work path is drawn whenever the Pen, Freeform Pen or Path Selection tool is active, and it is saved with the document, as in Photoshop. But once the path was finished, Delete/Backspace fell through to Edit > Clear (the pixels under it), so the only ways to remove it were the right-click Delete Path and the Paths panel, and it looked impossible to delete. With those tools, no path being drawn and the work path the one they edit (no shape layer or targeted vector mask in front of it), an unmodified Delete/Backspace now runs path.delete on the work path: one undoable Delete Path step. Direct Selection and the Curvature Pen are left alone, since Photoshop deletes their selected anchors, not the path. Co-authored-by: Claude Opus 5.5 <[email protected]> * Layer Style: drag on the image to move a drop or inner shadow (#5701) (#5893) As in Photoshop, with the Layer Style dialog on a Drop Shadow or Inner Shadow page, dragging on the image moves the shadow: its offset follows the pointer and is stored as the effect's angle and distance (whole degrees and pixels), moving the shared global light angle when the effect uses it. Space and the middle button still pan; colour pickers still sample. Co-authored-by: Claude Opus 5.5 <[email protected]> * Free Transform: shapes and paths stay on whole pixels (#5751) (#5841) * Free Transform: shapes and paths stay on whole pixels (#5751) With Snap Vector Tools and Transforms to Pixel Grid on, only the pointer was rounded, and only while a shape tool was active. Under the Move tool, or with a grab offset or a proportional scale, the box landed between pixels (a rectangle dragged to 540 px came out 539.6). An upright box on a shape layer or path now keeps whole-pixel edges whatever the tool. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Format (cargo fmt) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * Snapping: snap a drawn marquee, Object Selection box or shape by its edges while Space repositions it (#5748) * Move: Show Transform Controls frames every selected layer (#5917) As in Photoshop, with several layers selected (Shift-click with Auto-Select, or the Move marquee) Show Transform Controls draws one frame around all of them (the Background excluded) and outlines every selected shape layer. Before, the frame showed only the active layer, so the other selected layers had no feedback on the canvas. The frame joins the boxes Free Transform would open on each layer (transform_frame), and it hides while a corner radius widget is dragged. Free Transform works on one layer, so the shared frame has no handles and a press on it doesn't start Free Transform; a drag inside still moves every selected layer. Co-authored-by: Claude Opus 5.5 <[email protected]> * Warp: a thin layer stretched and bent keeps its curve on commit (#5793) (#5810) * Warp: a thin layer stretched and bent keeps its curve on commit (#5793) The mesh warp sized its triangle grid by the source rectangle only (one cell per 4 source px). A 3 px column scaled into a wide band and then warped got a single cell across, so the committed result was a straight, affine band while the preview showed the curve. The grid now also follows the destination length of the mapped rows and columns. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Warp: module doc describes the grid sized on both sides of the map (#5793) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * Dialogs: a close box in the title bar cancels like Cancel (#5496) (#5505) Dialogs drawn by the shared renderer had no close box: the only ways out were Cancel/OK or Esc. As in Photoshop on Windows, the title band now ends in a × (the icon button the floating panels close with) on Windows, Linux and the web, none on macOS. A click on it joins Esc in the single cancel path of `dialogs::show` (outcome = Cancel -> `cancel()`), so the live preview goes and nothing reaches the document or history. The × is left out of the title band's drag area, so a drag starting on it neither moves nor closes the dialog; the rest of the band still drags. Check Spelling (an untitled window) gets the same close box; it is Done, as every change there is already made. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * fix: commit type editing on Layers-panel selection (#5584) (#5612) * Info panel: show guide coordinates while dragging outside the canvas (#5728) (#5768) * Fix Info panel guide coordinates during ruler drags (storytold/photocraft#5728). Show the dragged guide position on one axis while the pointer is outside the canvas, matching Photoshop. Co-authored-by: Cursor <[email protected]> * Merge main; fill GuideDrag's new press field in the test; cargo fmt Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(ui): brush outline matches the stroke on Wayland at fractional scales (#5796) * fix(ui): brush outline matches the stroke on Wayland at fractional scales On Hyprland at 1.25 the brush outline was 1.25x too large and sat right of and below where the brush painted, by more the larger the brush. The engine places dabs exactly; the OS cursor bitmap was wrong. winit 0.30 sizes custom cursor bitmaps on Wayland with a wp_viewport destination whenever the scale isn't 1, and Hyprland (like Mutter before GNOME 48) ignores viewports on cursor surfaces: it shows the bitmap one pixel per logical pixel with the hotspot winit divided by the scale. A client can't tell which compositors do this, so on Wayland at any scale but 1 the brush outline and crosshairs are painted in-app, as on the web. Other platforms and Wayland at scale 1 keep the low-latency OS bitmap. Measured on Hyprland 0.56.2 at 1.25 (100 % zoom, 100 px brush): dab centre (288.5, 560.5), diameter 97 px; outline before (303, 574.5), ~130 px; after (288.5, 562), 107 px including its border. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Merge main; cargo fmt Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> * Raw: measure the Nikon D90 image area (4288x2848 at (10, 10)) (#4323) Aligning the decoded D90 sensor plane with the camera's own JPEG puts the image at (10, 10) in the 4352x2868 sensor plane, giving the camera's 4288x2848 frame (10-pixel margins; the right border reads the camera's flat 255 from column 4310). Add the measured ImageArea so a D90 NEF opens on the camera's frame instead of the uncropped plane, and make a measured profile leave a file that carries its own colour calibration (a DNG) untouched. Co-authored-by: Brandon Thomas <[email protected]> * Codecs: open Cineon (.cin) film frames read-only (#4691) * Raw: measure the Nikon D90 image area (4288x2848 at (10, 10)) Aligning the decoded D90 sensor plane with the camera's own JPEG puts the image at (10, 10) in the 4352x2868 sensor plane, giving the camera's 4288x2848 frame (10-pixel margins; the right border reads the camera's flat 255 from column 4310). Add the measured ImageArea so a D90 NEF opens on the camera's frame instead of the uncropped plane, and make a measured profile leave a file that carries its own colour calibration (a DNG) untouched. * Codecs: open Cineon (.cin) film frames read-only Cineon is the 10-bit logarithmic film-scan format DPX grew from. Read it from the same Kodak header family: the generic header (big-endian, orientation at 192, channel count at 193, the channel-1 bits/dimensions), one or three channels, three 10-bit samples packed into each 32-bit word on a word boundary. The 10-bit code values open as U16 (round(c x 65535 / 1023)); the file's log black/white points are a display choice and are not applied. A depth other than 10 bits or a channel count other than 1/3 is Unsupported; truncation errors rather than panicking. Read-only (no Cineon writer), so .cin joins the open filters and Cineon read closes part of #1049's G10 gap. * cargo fmt the extension lists Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Vikram Bhaskaran <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Valentin Klein <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Nigel Ihza Firdausy <[email protected]> Co-authored-by: buivanvu94 <[email protected]> Co-authored-by: mroxso <[email protected]> Co-authored-by: highperfocused <[email protected]> Co-authored-by: MarekSpodBiedry <[email protected]> Co-authored-by: Saad Abdullah <[email protected]> Co-authored-by: Saad Abdullah <[email protected]> Co-authored-by: Skyfuller <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> Co-authored-by: David Mann <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> Co-authored-by: FinnNk <[email protected]> Co-authored-by: Michael Higgins <[email protected]> Co-authored-by: optimalbytee <[email protected]> Co-authored-by: optimalbytee <[email protected]> Co-authored-by: Zer0C00L01 <[email protected]> Co-authored-by: Sir Clangington III. <[email protected]> Co-authored-by: LabDennis <[email protected]> Co-authored-by: Sidney Markowitz <[email protected]> Co-authored-by: Marco Arnulfo <[email protected]> Co-authored-by: Daktyl <[email protected]> Co-authored-by: Juan Antonio Redondo <[email protected]> Co-authored-by: Sabbir Ahmed <[email protected]> Co-authored-by: Jason Xiang <[email protected]> Co-authored-by: agent-346022 <[email protected]> Co-authored-by: agent-346022 <[email protected]> Co-authored-by: Ahmed0_0Mamdouh <[email protected]> Co-authored-by: Ikki Nishihara <[email protected]> Co-authored-by: haranishi <[email protected]> Co-authored-by: wwew <[email protected]> Co-authored-by: FredApps <[email protected]> Co-authored-by: FredApps <[email protected]> Co-authored-by: Bihacsy László <[email protected]> Co-authored-by: Stevan Marjanović <[email protected]> Co-authored-by: Stevan Marjanović <[email protected]> Co-authored-by: midasmatterhorn <[email protected]> Co-authored-by: safvanedge <[email protected]> Co-authored-by: safvanedge <[email protected]> Co-authored-by: Stevan Marjanović <[email protected]> Co-authored-by: envy-ai <[email protected]> Co-authored-by: WendelVolm <[email protected]> Co-authored-by: baz <[email protected]> Co-authored-by: Khawar Zamman Wani <[email protected]>
photocraft-cms
Pure-Rust ICC colour management for PhotoCraft. No workspace dependencies (L0, publishable),
no C, no unsafe. Implemented from the public ICC.1:2010 (v4.3) and ICC.1:2001-04 (v2)
specifications, CIE 15, and Adobe's published black point compensation paper.
API
use photocraft_cms::{Builtin, Intent, Profile, Transform};
let src = Profile::parse(&icc_bytes)?; // v2/v4: matrix/TRC, gray TRC, mft1/mft2/mAB/mBA
let dst = Builtin::CoatedCmyk.profile();
let t = Transform::new(&src, dst, Intent::RelativeColorimetric, /*bpc*/ true)?;
t.convert_u8(&rgba8, 4, &mut cmyka8, 5, /*copy alpha*/ true); // also convert_u16 / convert_f32 / apply (in place)
let mut out = [0.0; 4];
t.eval(&[1.0, 0.0, 0.0], &mut out); // exact single colour
Transform::proof(src, proof, display, intent, bpc, simulate_paper): soft-proof chain.GamutCheck::new(src, proof, ΔE): out-of-gamut test (gamut warning).Lut3d::from_transform(&t, 33).to_rgba16f_bytes(): display transform as a 3D texture.transform::cached(src, dst, opts): process-wide transform cache.Profile::to_bytes(): original bytes of parsed profiles (byte-exact), or an ICC v4.3 encoding.Profile::same_colors(&other): the same colour space whatever the encoding (every sample of a device grid within ΔE 0.5 through both), e.g. Photoshop's sRGB IEC61966-2.1 and the built-in sRGB.content_hash()compares bytes and suits cache keys only.
Evaluation
- Exact path: a float stage pipeline (curves, matrices, CLUTs, Lab↔XYZ, PCS encodings, BPC /
absolute scaling). Float buffers use it by default (
TransformOptions::precise_float). - Integer buffers: matrix/TRC chains use per-code input tables + matrix + output tables indexed
by
x^(1/4)(accurate near black even for pure gamma curves); chains containing a CLUT are sampled into a device link (33³ for 3 inputs, 17⁴ for 4, 4096 for 1) evaluated with tetrahedral interpolation (4D: linear on the first input between two tetrahedra); purely analytic chains (e.g. Lab ↔ RGB) are evaluated exactly. Buffers ≥ 16k pixels run on rayon (native only). - Rendering intents: AToB0/1/2 and BToA0/1/2 by intent with AToB0/BToA0 fallback; absolute
colorimetric scales by media white (
wtpt; v2 display profiles treated as D50; a zero, negative or non-finite white is refused withCmsError::Invalid); BPC uses neutral black points (Y only) mapped linearly in XYZ.
Built-in profiles (all CC0-1.0, generated by this crate)
| id | description |
|---|---|
srgb |
sRGB IEC61966-2.1 (Rec. 709 primaries, D65 Bradford-adapted, sRGB TRC) |
display-p3 |
Display P3 |
adobe-rgb-compat |
Adobe RGB (1998)-compatible (published primaries, gamma 563/256) |
prophoto-compat |
ProPhoto-compatible (ROMM primaries, D50, gamma 1.8) |
linear-srgb |
sRGB primaries, linear |
rec2020 |
Rec. 2020 primaries, Rec. 709 OETF |
gray-gamma-2.2, sgray |
gray gamma 2.2; gray with the sRGB curve (default gray working space) |
lab-d50 |
Lab identity (v4 encoding) |
coated-cmyk |
PhotoCraft Coated CMYK (synthetic, 300% TAC, medium GCR) — default CMYK |
The CMYK profile
Adobe's CMYK profiles (U.S. Web Coated SWOP, Coated FOGRA39) are proprietary, and the freely
downloadable characterisation-based profiles (ECI/FOGRA, colord, Ghostscript) carry
redistribution conditions or unclear licences, so PhotoCraft generates its own
(src/synth.rs): a Yule–Nielsen modified Neugebauer model (n = 2) over the 16 overprints with
ISO 12647-2 coated-paper Lab aims for paper/C/M/Y/RGB overprints, parabolic dot gain (14 % CMY,
17 % K at 50 %), GCR black generation (starts at 20 % gray component, K max 95 %), total ink
limit 300 %, perceptual tables with L* black-point scaling and soft chroma compression against a
sampled gamut boundary. profiles/photocraft-coated-cmyk.icc (237 KB, AToB 11⁴ lut16, BToA
21³ lut16) is that output, dedicated to the public domain (CC0-1.0). Regenerate with
PHOTOCRAFT_REGEN_PROFILES=1 cargo test -p photocraft-cms --release --test regen
It is a plausible coated-offset profile, not a measured characterisation: use your printer's profile for production print.
Not implemented / approximate
- v4.4
mpet(multiProcessElements, D2Bx/B2Dx) tags, named colour, device link and abstract profiles as transform endpoints,chad-based adaptation of v2 absolute colorimetry. - BPC destination black uses the BToA/AToB round trip directly (Adobe's curve fit for ill-behaved LUT profiles is not implemented); v2/v4 perceptual reference black mixing is not modelled beyond the PRMG black for v4 LUT profiles.
- Profile ID (MD5) is not computed when writing (left zero, which the spec allows).