CodeRabbit round-4 on the merge: an ui.inspect running between the frame
that ended the edit and the one that resets ui.type_box_overflow could
report typeBoxOverflow: true beside a null textEdit — the snapshot field
now reads false whenever the edit session is over
(inspect_gates_the_overflow_flag_on_the_session). The tooltip's
unconditional request_repaint per frame is gone: a resting pointer must
not redraw, and a pointer movement brings its own frame to hide the
card; the stale 'tooltip follows the pointer' comment is replaced with
the real contract.
CodeRabbit on #9478: the upright default for roman text also caught
half-width katakana and Hangul, which vertical_class rotates like other
half-width text; this PR leaves CJK as it was. Only roman characters now
stand upright and take one em. tab_widths gets its doc comment back.
Test: half_width_cjk_stays_rotated_beside_upright_roman
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every lossless-JPEG round-trip wrote a single DHT (id 0) shared by all
components, so the new per-component table mapping (comp_table, the t0/t1
split of the two-component loop) went untested, though real CR2 files
declare one table per component. testgen gains lj92_encode_tables (one DHT
per table id, Td chosen per component, code lengths rotated per table so
the tables differ); lj92_encode delegates to it with output unchanged.
New tests cover 2- and 4-component frames with distinct and mixed tables,
predictors 1, 4, 6 and 7, restart intervals and 16-bit 0/65535 extremes.
They now catch swapping t0/t1, pushing 0 into comp_table, and resolving
every component to tables[0]; they pass on main's decoder as well.
Co-authored-by: vangel76 <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
davidmann4's round-3 review of #8347: a marks row the box had to split
out of a run folded row after row into one line running past the edge by
almost the whole run, and a row merged into a justified paragraph's last
line kept the row above's spread instead of the last-line align.
- A marks-only row steps back only while it is at most two clusters (the
tip that hangs at the edge); a row above that already ends in a
hangable mark takes no more.
- A justified paragraph's last row keeps its own align (centered, right
or left): the placed clusters already carry the spread, and the merge
only moves x1/range.end.
- hanging_marks_of_a_split_run_keep_their_breaks pins that a run keeps
its rows and no line outgrows the box by more than two marks;
hanging_marks_stay_off_a_justified_paragraphs_last_line pins the
JustifyCenter/Right/All last lines. The old merged-row test now pins
the tip (a_stepped_mark_row_keeps_its_clusters_and_glyphs_in_step).
Make Default stored the page's values and Reset to Default read them,
but new effect instances always used the factory defaults. The Layer
Style dialog now carries the user defaults and lays them over the
factory ones when it adds an effect (on open, by checkbox or by +).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vertical type laid Latin letters and digits on their side (the word
turned 90°), and called that Photoshop's default. Photoshop's Vertical
Type tool stacks them upright, one character per em down the column:
the run's BaselineDirection is 1 (withStream); 2 (rotated) turns them.
- doc: CharStyle::rotate_roman (false = upright, the default).
- text/psd: BaselineDirection is read (a run without one takes the
style sheet's, which Photoshop writes as 2) and written back.
- text/layout: in vertical type, roman characters take the upright
path unless their run rotates them. Each is given one em down the
column (a second shaping pass sets its letter spacing from the shaped
advance), with pair kerning off between the stacked letters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The extra-sample budget check failed the whole decode, so a TIFF whose
image fits max_alloc but whose extra channels don't (e.g. 12000x8000
RGB8 with 5 alpha channels under wasm's 1 GiB limit) no longer opened,
though main opens it. Now the image decodes without the extra samples
and carries a DecodeWarning::ExtraSamplesDropped.
ExtraSamples values above 2 are reserved (TIFF 6.0, p. 31); they now
read as 0 (unspecified), so a save never writes a reserved value back.
Co-authored-by: jasallen <615848+jasallen@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged with our fix-up branch pr-8885-fixup (8f6863f53) on the author's head 996b55eb4.
Conflicts resolved:
- crates/io/src/tiff_layers.rs: #9148's tiff_source (an empty LMsk gets Photoshop's 14 bytes)
gives way to #8885's tiff_image_source, which writes the same bytes for an empty or short
LMsk; #9148's test stays.
- crates/io/src/flat.rs: #8776's DDS alpha step and #8885's TIFF channel stamp both run.
- crates/io/Cargo.toml, Cargo.lock: #8402's zune dev-deps and #8885's tiff dev-dep.
- crates/io/tests/it/tiff_layers.rs, docs: unions; docs/scorecard.md kept as is, regenerated at
the batch gate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Earlier PhotoCraft versions kept the 1053 of a Photoshop file they opened
and wrote it back unchanged, while storing spot channels added there
straight. A transparent Photoshop document carries 1053 = [0], so a white
plate added to it in 0.16.0 or earlier sat behind a 1053, and the rule
read that file in Photoshop's polarity: the added spot opened inverted.
A 1053 that lists fewer channels (non-zero ids; 0 is the transparency's)
than the file has after its transparency now counts as kept, with the
PhotoCraft 1057 and DisplayInfo spot conditions unchanged. Planes the
kept 1053 lists stay in Photoshop's polarity (they are the Photoshop
file's own); the ones after them are read straight. Photoshop and this
version write one id per extra channel, so their files are unaffected.
Known limit, as before: channels reordered there, or as many deleted as
added, can't be told apart from the Photoshop file's own.
The earlier versions are 0.1.0 to 0.16.0, not 0.11.1: every release
since writes the same 1057 and straight spot planes without a 1053.
Co-authored-by: jasallen <615848+jasallen@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The control channel sends one modifier set per request, so the Up after
Shift+Alt+right can arrive with neither Shift nor Alt (a client reports the
keys released first). `pointer_secondary` only reached `color_hud::release`
when the Up repeated Shift+Alt, so the non-held HUD stayed open and kept
picking the foreground from the hover.
Any Up now closes a non-held HUD that is still open; `release` ignores a held
(real-mouse) HUD, so the canvas gesture keeps its own button release.
Test: `a_control_channel_up_closes_the_hud_without_repeating_its_modifiers`
fails on the previous head ("the Up closes it whatever the modifiers say")
and passes now; it also asserts a held HUD survives a stray Up.
Photoshop can save a Displace smart filter with only DspF, a path to the
map file, and no embedded DspD map. Import required the embedded map, so
such a filter became psd.unsupportedFilter and Replace Contents skipped it.
It now imports as filter.distort.displace with the path as mapPath (read on
re-render through the document path policy) and writes back unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cache Levels 1 in Preferences turned off the 250 ms recount throttle,
because "forced" was derived from max_level == 1: only an Uncached
Refresh skips it now.
- The proxy factor became 2^(level-1) for every count, so the Levels,
Curves and Threshold dialogs counted a 6000x3000 image on an 8x proxy
instead of main's 7x (a 36 MP one 16x instead of 9x). Uncapped counts
use main's factor again; only a Cache Levels cap halves by powers of two.
- The panel opens in Compact View, as in Photoshop, and Compact View
counts the entire image whatever Source Expanded View was left at.
- The clipping corner marks are gone: Photoshop's Histogram panel has none.
- ui.inspect: "preview" counts only the active document's preview, and
"current" compares the source and cache level too, not only the
revision (a Source change left it true until the recount landed).
- ui-parity row lists two more differences (selection, Selected Layer
with a dialog preview); cargo fmt.
Co-authored-by: mathildalabs <347373177+mathildalabs@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stack carried #7415's codecs code from before its last review. This
brings in 1c5343d5, approved by FredApps: every TIFF extra plane must be
exactly width x height x sample bytes, with its two regression tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
psd_import.rs keeps main's warning for an incomplete merged extra channel
next to the PR's Photoshop spot polarity. people.toml takes main's entries
plus jasallen's own. Docs take both sides' status lines and revision rows;
docs/scorecard.md is regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checking for updates…, Make Ramp Web Safe, Copy Color as HTML, Web Color Sliders, the release-page installer hint and the save-over warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With #3567 the opening snapshot row gets the History Brush source column too, so the panel
test clicks the second snapshot cell. #3567 and main both added a Czech "New Snapshot";
main's translation pass ("Vytvořit snímek") stays.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
#3567 makes the document as opened snapshot 0, so {"snapshot": 0} is a valid source now;
main's bad-params test still listed it as an error.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The summary row still said 9/13/5 after an earlier batch PR moved FILE-215-11 to partial,
and #3297 moves FILE-215-3 to done: scorecard/file_compat.toml now counts 10 done,
14 partial, 3 missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the Mesh declaration's cube edge and output range (#9078) alongside
main's header-aware inference (#9121): a declared range wins for in-range
node codes, and anything else falls back to the depth inference, where a
header (the 3DMESH magic included) allows a 10-bit reading.
main's three_dl_without_a_header test used 'Mesh 1 10' as an arbitrary
header line on a 2-cube; that is now a 3-cube declaration, so it uses the
bare 3DMESH magic as its header.
Merged with our fix-up pr-3297-fixup (1de1e9eb58) on top of the author's head 053e1e0d03.
Conflicts resolved: channel_cmds.rs routed() keeps the PR's PAINT_IDS list plus the batch's
paint.artHistoryBrush; paint_cmds.rs Paint Bucket params keep the batch's "mode" and the PR's
"filterMask" target; docs/scorecard.md takes the batch's numbers with FILE-215-3 done.
* contributors: credit VoiceLessQ by display name
* Contributors: add my name (erenova)
Help › About › Contributors shows me as "Erenova" when the display-name view
is picked. The name is fixed rather than synced from my GitHub profile; no
real name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: VoiceLessQ <t12kaem@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
* fix(ui): Properties Transform shows a shape's path, not its stroke
For a shape layer, Properties › Transform showed the pixel bounds, so a
400 × 300 rectangle with a 15 px stroke read W 416, H 316, X 192, Y 142,
and typing a width scaled those bounds rather than the path. As in
Photoshop, the fields now show and edit the path's geometry (W 400,
H 300, X 200, Y 150); pixel and other layers are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Properties: a shape's W/H takes edits under half a pixel
CodeRabbit finding on #9181 ("Apply fractional W/H edits below 0.5 px"): the
W/H field and transform_params ignored changes under 0.5 px, so a 400.25 px
path typed as 400 kept its old width, though the fields now show and scale
the path exactly. For a shape the threshold is half the field's last shown
decimal (focusing and leaving the field, which re-reads its rounded text,
still changes nothing); pixel layers keep half a pixel. New test:
a_shape_path_takes_a_width_edit_under_half_a_pixel (the edit is dropped
without the fix).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
A UTF-16 .look that Photoshop loads was read as UTF-8 and failed with "no <size> in .look", in Color Lookup and in PSD import. Decode FF FE / FE FF as UTF-16 before picking the format.
Fixes#9118
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Vanishing Point is not modal, so the Layers panel and menu commands stay
usable while it is open. The stamp preview kept painting over the document
as it was when the mode opened, and OK painted whichever layer was active
by then: stamp on layer 1, click layer 2, and the canvas still showed
layer 1 while OK cloned onto layer 2 (a filter run meanwhile was hidden).
filter.vanishingPoint now takes an optional `layer` (the UI passes the
session's when another layer was picked, so recorded actions stay
portable) and makes the painted layer active, so Fade and a colour-channel
target follow it. The preview repaints over the document as it is now when
its pixels change (the canvas syncs it before drawing, so no frame goes
without the strokes); a selection or view change keeps it as it is.
display_doc's VP branch is also keyed to the session's document, as main's
Puppet and Perspective Warp branches are (#5115): a document opened in the
same frame no longer shows the other document's strokes.
Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docking profile's canvas body takes no drop, so a tab released over
it floats under the pointer. A drop on the outer edge band along the
canvas column's top still docks above the canvas.
Gaussian Blur and the other filter and adjustment dialogs are in
ui.dialogs from the call that opens them, so a click in the dialog's
first frame already finds the panel windows blocked. The panel windows
stay shown while the app is in the background under the dialog.
The dock area notes which native window has a focused text field and
moves the menu's text keys there itself. The main window's clipboard
handling skips its paste request while such a field has the keyboard.
Redone on the PR head 053e1e0d0 (the author's main merge); the earlier
fix-up f7af09d0f carried the first six points.
With a smart object's filter mask targeted, every routed command got
"target":"filterMask" and the filter-mask precondition instead of its own:
- Cmd+T and Edit > Transform > Flip/Rotate failed ("can't transform a
filter mask on its own"); now the smart object transforms, as in
Photoshop (lone_target -> Ok(None), and transforms get no target).
- Move (layer.translate) re-rendered the whole filter stack on every
nudge, and failed for contents that can't render.
- Convert for Smart Filters became enabled and nested the smart object;
Apply Image, Last Filter, Liquify, the lens filters, Vanishing Point,
the render filters and Desaturate ignore the target.
`follows_filter_mask` now leaves these out, in the shell, in
inject_target, in the precondition and in the re-render hook; Paste
keeps its own precondition.
- With the filter mask shown (Alt-click), clicking the layer, layer-mask
or vector-mask thumbnail (or ui.set maskTarget/vectorMaskTarget/
filterMaskTarget:false) left the view on (and ui.set maskTarget:false
left the filter mask targeted), so strokes kept landing in
the filter mask; those now end the view (CodeRabbit, panels.rs).
- ui.set filterMaskTarget:true on a layer without smart filters, or with
a single channel targeted, cleared the mask target and answered ok; it
is now refused before anything changes (CodeRabbit, control.rs).
- Curves on a targeted filter mask showed colour channels and the smart
object's histogram; it is now a gray plane with the mask's histogram
(GraySurface::FilterMask).
New on this head:
- Filters with a parameter schema (Gaussian Blur, High Pass, ...)
refused "target":"filterMask" ("`target` must be pixels, mask,
quickMask or {channel}"), so blurring the filter mask, the usual way to
feather it, failed from the menu, the dialog and agents. The filter
validation now accepts it (blurring_the_filter_mask_feathers_it).
- Delete with a selection and the filter mask targeted ran Edit > Clear
on the smart object ("not a pixel layer"); it now fills the filter mask
with the background colour there, as Photoshop does. With no selection
Photoshop deletes the layer, which Delete already did
(delete_with_the_filter_mask_targeted_edits_the_filter_mask).
- docs/control-protocol.md: the ui.set line lost its closing parenthesis
in the main merge.
Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Photoshop reads and writes IFF; PhotoCraft opened Amiga IFF/ILBM files
but had no writer. Saving as .iff now writes a FORM ILBM with a BMHD and
a ByteRun1-compressed BODY of 24 bitplanes (red, green and blue, least
significant bit first), one plane row at a time. An image with alpha
also gets a mask plane (masking 1): alpha of 128 or more is opaque, and
when any pixel is not fully opaque the export warns that alpha is
reduced to on/off transparency. Gray is expanded to RGB, 16-bit and
float images are reduced to 8 bits, and images wider or taller than
65535 pixels are refused.
The reader also opens 24-bitplane ILBMs, so a saved file reopens with
the same pixels. A transparent color index in a 24-bitplane file is
refused as unsupported.
IFF leaves ASYMMETRIC_EXCEPTIONS, Save As offers Amiga IFF, and the
codecs README, file-format parity and G10 are updated.
The dialog always opened on 2-Up. It now remembers the Original /
Optimized / 2-Up / 4-Up tab last chosen (in the UI state, so across
restarts too) and reopens on it; 2-Up stays the first-time default.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Photoshop reorders alpha and spot channels when one is dragged up or down
the Channels panel: a line shows where it lands, a drop over the colour
channels puts it first among the alphas, and colour channels don't move.
PhotoCraft only took channel drops on the footer buttons. Dragging an
alpha row over the other rows now marks the slot and runs channel.move
on release, one history step; colour channels still don't reorder.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>