When the filter is applied or its criteria change while it filters, the
selected layers it no longer lists are deselected, as in Photoshop: through
select.deselectLayers when none stays listed, otherwise the listed ones stay
selected and one of them becomes the active layer. Turning the filter off
changes nothing, and a layer selected later while it is filtered out stays
selected. The criteria last seen are kept in egui memory, so a change made
through ui.set {layerFilter} is handled too.
Fixes#10879
Blend If in a recorded layer Set loads as layer.layerStyle.blendingOptions
and plays (it was dropped without a word). The Blending Options dialog's
Set (opacity, fill, mode, Blend If, Advanced) stays one step and saves back
as one Set; with other keys those go through layer.setProps.
Gradient Fill Make and Set load as layer.newFillLayer.gradient and
gradient.fill.set with stops, transparency, midpoints, scale, offset,
dither and align. Midpoint k is the Mdpn of stop k + 1, as the PSD reader
reads it. A loaded step saves back as its recorded descriptor until it is
edited; a Noise gradient, smoothness below 100 %, a non-classic
interpolation or a transparency midpoint stay Photoshop steps.
Fixes#10771
Free Transform of several selected layers left the Background out
without a word, where Photoshop refuses with its locked-layer alert. And
with the box open, taking a layer out of the selection (or adding one)
without changing the active layer left the box open, still moving the
layers it started with.
- targets_of keeps the Background; edit.transform's selection default
refuses with `layer "Background" is locked`, and Ctrl+T / Edit ›
Transform show the same alert as a position-locked layer. An explicit
`layers` list and the Background alone keep today's behaviour.
- Move › Show Transform Controls shows no box for that selection either.
- Any change to the selected layers while a layer box is open applies
the box to the layers it moves, and doesn't open it again.
Fixes#11101
LoadFetch::blob_bounded decompressed a new blob up to max_blob_bytes
and only then charged it against max_total_bytes. Successful blobs are
retained, so several distinct, highly compressible blobs each allocated
a full max_blob_bytes before the total was checked. A new blob may now
inflate only to what the total budget has left.
The browser build loaded native documents with the desktop defaults
(1 GiB a blob, 16 GiB in all), far beyond a wasm32 instance's 4 GiB of
linear memory that the editor also uses. On wasm32 the defaults are now
512 MiB a blob and 1 GiB in all.
* codecs: admit animated GIF screens, sparse RLE BMPs and icon PNG profiles
- Animated GIF decoding (decode_gif_frames) skipped the logical-screen
plausibility check the first-frame decode applies, although the
backend initializes the whole screen before reading a frame. Both now
share gif_plausible().
- RLE BMPs skipped the file-size plausibility check entirely, so a
header-only file could make the decoder allocate and clear a
multi-gigabyte canvas. Like a GIF's screen, 256 MiB of canvas is now
free of data and the rest must be backed by the file.
- The image crate's ICO decoder opens an embedded PNG with no limits,
and png inflates an iCCP profile while the decoder is built. Icon
PNG profiles are now inflated into a sink first and refused past
255 x 65519 bytes (or max_alloc), with a 64 MiB total across entries.
* address review: visit each ICO profile chunk offset once
* codecs: charge dropped PNG text against the metadata budget
read_text_metadata debited the shared text allowance only for text it
kept. A compressed iTXt chunk that inflated up to the whole remaining
allowance and then failed UTF-8 validation (or hit a corrupt or
truncated stream) was dropped without being charged, so every further
such chunk could repeat the same inflation. bounded_text now reports
the bytes it produced and the caller charges them whether or not the
text is kept.
* codecs: charge the output a failing text decompress wrote
* address review: charge Latin-1 zTXt error batch at UTF-8 length
* codecs: leave Extended XMP fragments out of zune-jpeg's header parse
zune-jpeg 0.5 keeps every Extended XMP APP1 fragment until its GUID's
set is complete, and re-sorts and re-checks the whole pending list
after every marker it parses. A file with many small, consistent but
incomplete fragments (or a few followed by many other markers) costs
quadratic time before any pixel is decoded.
Nothing in PhotoCraft reads zune's reassembled Extended XMP (metadata
comes from scan_metadata over the original bytes), so the decoder now
hands zune a copy without those segments when a file has any. Files
without Extended XMP are passed through unchanged.
* codecs: reserve only the bytes kept after dropping Extended XMP segments
Development applies every gain map to every pixel it covers, so a list
of thousands of maps multiplied the work of an otherwise admissible
image. Cap them like MapPolynomial; the rest are named as not applied.
The build now takes each job's vertex entry name from build_jobs, the vertex
module is generated from the same jobs, and build_jobs_share_no_shader also
checks that compose.wgsl has no vertex entry point. Before, the test checked
the job plan on its own and still passed if the build went back to one shared
vs (verified: re-adding vs to compose.wgsl now fails the test).
Co-Authored-By: FinnNk <FinnNk@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jxl-oxide inflates Brotli-compressed auxiliary boxes (Exif, XMP) into
storage its allocation tracker doesn't see while it reads a container,
and samples spline geometry into an untracked vector with no bound on
the sample count. A raw tile needs neither: refuse a container holding a
brob box before reading it, and a codestream whose frames draw splines
before rendering.
read_plane decoded every segment separately, even when a file pointed
every tile at the same bytes. Each lossless JPEG decode rebuilds its
Huffman tables and each result is retained until assembly, so one small
range repeated across many tiles multiplied header work and memory by
the tile count.
Decode each distinct (offset, length, geometry) once and scatter the
shared samples into every tile that names it.
* raw: refuse lossy DNG tiles that carry Extended XMP
zune-jpeg keeps every Extended XMP fragment until its set is complete
and re-sorts and re-checks all pending fragments after each marker, so a
lossy (compression 34892) tile of many small incomplete fragments costs
quadratic time before a pixel is decoded. A raw tile has no metadata:
refuse one with an Extended XMP APP1 segment before parsing it.
* address review: bound Extended XMP identifier to APP1 payload
retone compared the buffer length with an unchecked w * h. In a release
build a product that wraps passed the check for a tiny buffer, and the
banded passes then ran over the original, huge height.
Free Transform showed and grabbed the reference point at the box centre, so a press there moved the pivot instead of the content. As in Photoshop, the reference point is now hidden by default and a Toggle Reference Point checkbox before the 3x3 grid in the options bar shows it again. While it is off the centre moves the content, the grid is dimmed, and Alt-click still sets a new reference point.
Fixes#11098
read_response searched every byte read so far for the blank line after
each read, so a server trickling a 16 MiB reply in tiny fragments made
the client rescan it once per fragment. Resume the search three bytes
before the previous end.