Commit Graph
76 Commits
Author SHA1 Message Date
FredApps 27ce4e9fa2 psd: share hue and levels writer framing 2026-11-19 01:02:42 +01:00
FredApps 85dc8d90e2 Merge descriptor parser and preserve shared writer pin 2026-11-19 00:45:53 +01:00
FredApps 851642f6ec Merge pull request #3921 from FredApps/fix/786-psd-tagged-descriptor-adapter
psd: share recovering descriptor-block headers
2026-11-19 04:29:05 +07:00
FredApps b7c311d106 Merge main preserving scalar reader integration 2026-11-18 21:27:47 +01:00
FredApps a089c3f312 Delegate raw adjustment writers to craft-psd 2026-11-18 21:23:52 +01:00
FredApps f3ba7a5cd2 psd: share recovering descriptor-block headers 2026-11-18 20:38:43 +01:00
FredApps 9a58ca6bd3 Merge main preserving scalar and section regression modules 2026-11-18 20:29:34 +01:00
FredApps f9e81b8a0f Merge pull request #3907 from FredApps/fix/786-psd-tysh-adapter
psd: share bounded TySh text-prefix reading
2026-11-19 02:14:16 +07:00
FredApps c6017db502 Merge vector cutover and pin combined shared PSD readers 2026-11-18 19:33:43 +01:00
FredApps 5ff845951c Merge vector cutover and pin combined shared PSD readers 2026-11-18 19:33:39 +01:00
FredApps 5f621b3f69 Merge remote-tracking branch 'origin/main' into fix/786-psd-scalar-blocks 2026-11-18 19:31:24 +01:00
FredApps 57ae4ceeff psd: read scalar layer blocks through shared views 2026-11-18 19:31:24 +01:00
FredApps 450d21647c Merge main preserving Unicode and vector regression modules 2026-11-18 18:34:41 +01:00
FredApps e97a6390ac psd: share bounded type-layer text prefix 2026-11-18 17:42:55 +01:00
FredApps d0693d9dcb psd: share recovering section-divider framing 2026-11-18 16:39:11 +01:00
FredApps 7edb6b154a Merge pull request #3898 from FredApps/fix/786-psd-fixed-adjustments
psd: share fixed-binary adjustment readers
2026-11-18 22:05:40 +07:00
Dylan M. Taylor 292313f2a1 Merge pull request #3774 from storytold/cutover/shared-psd-packbits
psd: cut over recovery PackBits decoding to craft-psd
2026-11-18 09:13:46 -05:00
FredApps 1d823a01a1 psd: share fixed-binary adjustment readers 2026-11-18 15:12:01 +01:00
FredApps 67e6e27fa7 psd: share Unicode layer-name record framing 2026-11-18 14:27:17 +01:00
Dylan M. Taylor 47384980a4 psd: cover the shared PackBits row-limit error mapping
The recovery wrapper maps every non-decompress failure to Error::Invalid so a
limit refusal is never reported as truncated data. That arm had no test, which
left the changed lines under the coverage gate.
2026-11-18 07:44:01 -05:00
FredApps 82cf1b5c5e psd: align vector fixtures with fixed-size chunk lint 2026-11-18 13:39:15 +01:00
FredApps c149bb513f psd: read vector mask records through craft-psd 2026-11-18 13:19:34 +01:00
FredApps 49170cdf18 fix(psd): surface unsupported modern placements at import boundary 2026-11-18 09:43:01 +01:00
FredApps cb3f66e06c fix(psd): align local warp bounds with shared numeric contract 2026-11-18 09:36:47 +01:00
FredApps a1c1288b13 #3779: pin bounded PSD placement fixes and test app boundaries 2026-11-18 05:59:44 +01:00
FredApps cc5c5cb732 #3779: integrate reviewed shared PSD adapters with current main 2026-11-18 04:13:58 +01:00
Dylan M. Taylor d9ebc75707 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-16 23:08:50 -05:00
FredApps 3bc3adb4e0 psd: parse descriptors and placed layers with craft-psd
Pin only craft-psd to craft-libs main 9fc471fc (includes #1887
parse_prefix and #1885 PackBits recovery). Mid-stream descriptor
reads use Descriptor::parse_prefix, mapped back to the public
effectcraft Descriptor/DValue types. SoLd/SoLE/PlLd placements come
from craft_psd::smart::SmartObject, including quiltWarp, and
render_placed bakes through craft_psd::FloatImage.

Pixel decode stays local until a follow-up can check unmatte parity
on composite_f32.
2026-11-16 16:15:25 +01:00
Dylan M. Taylor 9da73e9cf3 psd: delegate ZIP prediction reversal with budgeted scratch 2026-11-16 09:47:19 -05:00
Dylan M. Taylor d020ebd460 Integrate merged PSD writer and linked-file cutovers 2026-11-16 09:41:37 -05:00
FredApps ed8811d2d8 psd: parse linked files with craft-psd and pin past #1845
Repin only craft-psd to craft-libs main e836b6fd (includes #1845).
lnk2 / lnkD / lnk3 / lnkE records come from craft_psd::smart::linked_files;
payload ranges are shifted from the block back into the document bytes.
is_linked_layer_key is the deferral predicate.

Descriptors, placed objects, and pixel decode stay local until
craft-libs#1887 (parse_prefix) and #1885 (PackBits recovery) are on main.
2026-11-16 14:55:09 +01:00
Dylan M. Taylor 4b658873b7 psd: delegate bounded recovery PackBits rows to craft-psd 2026-11-16 08:34:11 -05:00
FredApps 4edbd480fb Merge remote-tracking branch 'upstream/main' into onee/i786-psd-writer-craft-psd 2026-11-16 14:20:51 +01:00
FredApps 7311b6574c psd: rustfmt write.rs to the workspace style
The previous commit had been formatted without rustfmt.toml
(use_small_heuristics = "Max"), so cargo fmt --check failed on the gate.
2026-11-16 13:30:21 +01:00
FredApps 952918aa02 psd: keep finite 32-bit color samples outside 0..1
Integer depths are still clamped. NaN and infinities use the same
mapping as the reader.
2026-11-16 12:59:44 +01:00
FredApps 7f9f0bc489 psd: record stray leading bytes before the layer block check, use craft-psd's long-length keys 2026-11-16 12:31:10 +01:00
FredApps 00bf6a06c9 psd: keep the luni block's bytes so exported files are unchanged 2026-11-16 12:30:10 +01:00
FredApps e9690b2c02 psd: walk top-level global blocks for the layer block repair 2026-11-16 12:17:28 +01:00
FredApps e51a805f4e psd: recover layers from a length-prefixed or fallback Lr16/Lr32 block 2026-11-16 12:04:22 +01:00
FredApps 49abf0b402 psd: write 32-bit layers in Lr32, wide RLE rows raw 2026-11-16 11:57:54 +01:00
FredApps 50f8cc3397 psd: write fixtures with craft_psd 2026-11-16 11:45:48 +01:00
FredApps 59671cfd29 psd: keep layers past a damaged resource, report an unreadable Lr16 block 2026-11-16 11:41:54 +01:00
FredApps 1cc80e7443 psd: read the document structure with craft_psd
Psd::parse reads the header, colour mode data, layer records with their
additional information and the global blocks with
craft_psd::PsdFile::from_source. Channel data and the merged image stay in
the document as ranges, and the linked-file blocks are left in the source.
A damaged layer section still opens as the merged image. The local 8BPS
section, record and block walkers are removed (storytold/craft-libs#786).
2026-11-16 11:33:33 +01:00
Dylan M. Taylor fd1df348c0 Formats: move EffectCraft format codecs to craft-libs 2026-11-12 05:33:48 +00:00
Dylan M. Taylor c6d5c62d5a PSD: bounded zip errors, budgeted prediction row, row-bounded PackBits, channel checks before the result (#2987)
* PSD: bounded zip errors, budgeted prediction row, row-bounded PackBits, channel checks before the result

A failed inflate was formatted with Debug, which prints the whole partial
output; only the status is kept. The 32-bit ZIP prediction scratch row was
allocated outside the decode budget; it is charged now. PackBits packets
were appended whole even past the row's end, growing the reserved plane;
they are cut at the row. The composite and layer decodes allocated the
document-sized result before checking that the channel data exists; the
compression and raw/RLE lengths are checked first.

* address review: check short ZIP composite data and the layer mask channel before allocating the result

* address review: drop the channel prechecks that rejected PSDs the lenient decode accepts; keep the allocation bounds
2026-11-11 14:39:19 -05:00
Brandon ThomasandClaude Opus 5.5 dc1f9eab74 Batch fixes: rustfmt, is_multiple_of in the Vegas test, drop a Swedish row #2718 retired
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:20:24 -04:00
Brandon ThomasandClaude Opus 5.5 5802cdc6a4 Follow-up to #2714: a thin bake isn't refused for triangle rounding
A 16384x1 output stacks every grid row onto one pixel row, so a sane warp
visits ~100x its pixels; allow each triangle about two grid cells (CodeRabbit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 10:58:30 -04:00
marshiyar 4f8f4ff56e psd: cap the smart-object warp bake's rasterising work 2026-10-30 20:26:50 -07:00
Dylan M. Taylor 388ebc10ac Refactor psd for strict Clippy checks 2026-10-28 06:09:21 +00:00
aiongg 5c6375c7ea refactor(psd): move limits, model, parsing and pixel decoding out of lib.rs 2026-10-26 21:49:11 +00:00