Commit Graph
3985 Commits
Author SHA1 Message Date
kiwi4boy 08c85df8b4 Merge branch 'ppt95-text' into ppt95-shapes
# Conflicts:
#	crates/ppt-binary/src/ppt95/tests.rs
2026-11-20 00:54:08 -05:00
kiwi4boy e031ad06a0 ppt95: bound the paragraphs and runs text makes; a centred master title takes its ruler
Each paragraph is about 4 KB and each run about 2 KB, so a text atom of
nothing but paragraph or line breaks made gigabytes from a megabyte of
file. The document's text now makes at most 65,536 of them together and
leaves the rest out, with a warning.

A master's title placeholder of type 0x0F (a centred title) is in the
title family, but only a plain title set the title style's ruler.
2026-11-20 00:53:23 -05:00
kiwi4boy ec51aa9d1c ppt-binary: slides with their own scheme in the PowerPoint 95 shape tests don't follow the master's
Two tests gave a slide its own colours while it still followed the master's scheme; since the
slide box's flags are read, PowerPoint 95 marks such a slide as not following.
2026-11-20 00:38:13 -05:00
kiwi4boy 82037cf1a0 Merge branch 'ppt95-text' into ppt95-shapes 2026-11-20 00:37:37 -05:00
kiwi4boy 513eecc86c Merge branch 'ppt95' into ppt95-text
# Conflicts:
#	crates/ppt-binary/README.md
#	crates/ppt-binary/src/ppt95.rs
#	crates/ppt-binary/src/ppt95/tests.rs
2026-11-20 00:37:32 -05:00
kiwi4boy 041ba948c8 ppt-binary: PowerPoint 95 slides follow the master's objects and scheme
The slide box's bytes at +16 and +17 are whether a slide shows the master's objects and uses the
master's colour scheme: turning the master's objects off on one slide clears the first, and giving
one slide its own scheme clears the second. A slide following the master's scheme now takes the
master's colours rather than the copy it holds.
2026-11-20 00:36:22 -05:00
kiwi4boy cfd19dcf87 Merge branch 'ppt95-text' into ppt95-shapes
# Conflicts:
#	crates/ppt-binary/README.md
#	crates/ppt-binary/src/lib.rs
#	crates/ppt-binary/src/ppt95.rs
#	crates/ppt-binary/src/ppt95/tests.rs
2026-11-20 00:29:58 -05:00
kiwi4boy 07b7c8b8fb ppt-binary: PowerPoint 95 master text styles, anchoring, spacing and justified text
Paragraph runs give line spacing, space before and space after at +52, +56 and +60: a percentage
of a line, or minus a size in points. Alignment 3 is justified. The text atom's +8 byte holds the
anchoring (top, middle or bottom, and whether it is centred across) and its +4 flags word wrap.
The Environment's 4052 atoms, one per text type, hold the master's styles, five levels each laid
out as the runs are; the title, body and other ones become the master's styles, with the margins
of the ruler the master's title and body name. All of this was learned from files PowerPoint 95
wrote.
2026-11-20 00:25:00 -05:00
kiwi4boy 79127c3c5a ppt-binary: PowerPoint 95 freeforms and groups
Freeforms (3016) now read as custom paths in their box: a move to the
first point and lines to the rest from the 3035 points, closed when the
low byte of the 3017 flag is 1, with the fill, line and shadow of their
format and, when open, the arrowheads of their 3007 atom. Points are
capped at 8192 and never read past their record; a freeform of fewer
than two points is left out. Their format's angle is not read.

Groups (3001) read as groups of their members, which keep their
absolute slide places: the group's box is the union of its members'
and is also its child space. Members are read as the page's objects
are, groups included, nested at most 32 deep, and count towards the
page's object cap.
2026-11-19 23:34:47 -05:00
kiwi4boy c8e440d125 ppt-binary: PowerPoint 95 rotation direction, orientation bits, the other 12 autoshapes and shadow offset
PowerPoint 95 measures angles counter-clockwise, so every angle is now
negated into DrawingML's clockwise rot. For shape codes of 0 and up the
transform comes from the geometry alone: the byte above the code holds
counter-clockwise quarter-turns and a horizontal mirror made after them,
which become a clockwise rot and a horizontal flip, with the box turned
back after an odd number of quarters. The rectangle, rounded rectangle
and ellipse keep taking the angle from the format, without flips. A
mirrored trapezoid is the outline wide at the top, turned a half-turn
further and unflipped, so its text stays upright; otherwise it is the
trapezoid preset.

Codes 9 to 14, the object model's shapes 13 to 24, read as right arrows
(the arrow and thick arrow, in all four directions), home plate, cube,
balloon and seal, with adjust values matched to what PowerPoint 95 drew.
A code no probe showed is a rectangle with its fill, line and text. The
shadow now falls by the format's offset at +36 and +40, clamped to 10 in,
and is half transparent when +29 says so.

The sample check compares each straight outline against the polygon in
the rendering PowerPoint 95 saved beside its file.
2026-11-19 23:13:46 -05:00
kiwi4boy e6c282e942 ppt-binary: PowerPoint 95 line styles, dashes, arrowheads, flips and quarter-turn rotation
PowerPoint 95 shapes now take their angle and both flips from the format
record (3005 +48 and +52) rather than the geometry, which holds the outline
as drawn: whole quarter-turns are folded into its box, so a box turned an
odd number of them is turned back about its centre. Lines read their width
from the line style (1 to 10 pt), their dots and dashes, and on lines the
start and end arrowheads from the 3007 atom. The shadow colour comes from
+30, with the scheme's shadow slot by default. The trapezoid, wide at the
top, is now its own outline instead of a flipped preset, so a user's flip
applies on top. Shadow offsets are still fixed at 6 pt.
2026-11-19 22:49:03 -05:00
kiwi4boy c7c00cc101 ppt-binary: read PowerPoint 95 shapes and lines (#2317, step 3)
PowerPoint 95's twelve shape codes now read as DrawingML presets with
their adjust values, and lines from their 3015 ends with flips for their
direction. The 3005 format gives each its fill and line colour (an RGB or
a scheme slot, or none), its shadow and a horizontal flip; the angle comes
from 3009 as before. A shape that draws nothing but text stays a text box,
and shapes of unknown codes without text are skipped. The trapezoid is
flipped vertically, as PowerPoint 95 draws it wide at the top. Line widths
and styles, vertical flips and shadow offsets are not read yet.
2026-11-19 22:20:40 -05:00
kiwi4boy 60d7a16ccc ppt-binary: read PowerPoint 95 placeholders and text (#2317, step 2)
PowerPoint 95 slides now hold their placeholders and text boxes, each with
its box (converted from master units about the slide's centre) and its text:
paragraphs with their level, alignment, bullet character and the indents of
the text's ruler, and runs with their font, size, bold, italic, underline and
colour, decoded as Windows-1252. Placeholder types use PowerPoint 95's own
numbering. The master's placeholders place the default master's, and its
footer row every layout's, through the overlay the PowerPoint 97 path uses,
now shared. Run tables and text are bounded by the text they cover.
2026-11-19 21:59:39 -05:00
kiwi4boy 6503815382 ppt-binary: README and NotPpt wording for PowerPoint 95
A slide's own background can be no fill as well as a solid colour, and NotPpt names PowerPoint 95
alongside 97-2003, since both are read.
2026-11-19 21:59:20 -05:00
kiwi4boy e5ad48368d ppt-binary: cap PowerPoint 95 masters lower than slides
Each master becomes a copy of the caller's default master with its layouts, so a file listing
many masters is held to 256 rather than the slides' 65,536.
2026-11-19 21:34:54 -05:00
kiwi4boy 7ce48c367d ppt-binary: read PowerPoint 95 slides, masters, layouts and backgrounds (#2317, step 1)
PowerPoint 95 files use 16-byte record headers and a single record tree
instead of an edit chain. A stream that starts with that tree now takes
its own path: the slide size, each master as the caller's default master
with the file's colour scheme as its theme, and the slides in order with
their master, layout type and, when they don't follow the master's, a
solid background. Shapes, text, pictures and notes come in later steps,
so the slides are empty. Anything else keeps the PowerPoint 97 path,
whose TooOld error now names PowerPoint 4.0 and earlier.
2026-11-19 21:33:32 -05:00
Dylan M. Taylor 5c0d5999bd Expose bounded ZIP directory records for catalog selection (#2474)
* zip: expose bounded central directory record listing

* Preserve original ZIP central directory name bytes
2026-11-19 21:08:56 -05:00
Dylan M. Taylor 3dff4793f1 craft-develop, craft-color-transform: deduplicate spline, add 1024-entry compose_len, spaces, and warm-green WB test (#2464)
* craft-develop, craft-color-transform: deduplicate spline, add 1024-entry Lut1::compose_len, spaces, and warm-green WB test

* cct: check bradford identity and matrix tolerance in warm-green WB test

* style(color-transform): fix clippy needless_range_loop in cct test
2026-11-19 20:36:43 -05:00
Dylan M. Taylor 106134631c video: add TrackDecoderOptions, with_threads, and set_draft on TrackDecoder (#2461)
* video: add TrackDecoderOptions, with_threads, and set_draft on TrackDecoder (#778)

* fix(video): allow unused opts when decoder features disabled

* video: fix unreachable pattern in TrackDecoder::set_draft and verify inner state on reset

* fix(video): allow irrefutable_let_patterns when single decoder feature enabled

* fix(video): remove nonexistent hevc/av1 Decoder::threads test getters

* style(video): allow clippy::cognitive_complexity in track options test
2026-11-19 20:36:39 -05:00
Dylan M. Taylor 483f2ab81f craft-usd: extract neutral USDA/USDC scene, prim, and layer read/write (#778) (#2459)
* craft-usd: extract neutral USDA/USDC scene, prim, and layer read/write (#778)

* chore: update Cargo.lock for craft-usd

* craft-usd: add integration tests for USDA/USDC scene read/write (#778)

* fix(usd): use asset-only external reference syntax in scene test

* test(usd): include Shader child prim for material surface target in neutral layer test
2026-11-19 20:36:34 -05:00
Dylan M. Taylor 03d1afced9 svg: extract shared SVG document/CSS interpretation helpers (#778) (#2456)
* svg: extract shared SVG document/CSS interpretation helpers (storytold/craft-libs#778)

* svg: document doc_style::length unknown-unit px fallback

* style(svg): fix clippy field_reassign_with_default in doc_style test
2026-11-19 20:36:26 -05:00
Dylan M. Taylor 1a3be2d439 craft-develop: extract ToneMap/CameraTone and pure-Rust finish helpers (#2471)
* craft-develop: extract ToneMap/CameraTone and pure-Rust finish helpers

* fix(develop): add serde_json dev-dependency for tone tests
2026-11-19 20:23:11 -05:00
Dylan M. Taylor 429937ad72 craft-dds: expose shared BC1-7, ETC1/EAC, and packed pixel decoders (#778) (#2460)
* craft-dds: expose shared BC1-7, ETC1/EAC, and packed pixel decoders (#778)

* fix(dds): qualify super::anchor in bptc test

* craft-dds: add independent known-answer test vectors for BC6H, BC7, ETC1, and EAC

* fix(dds): remove unused partition/anchor imports in bptc test
2026-11-19 20:03:14 -05:00
Dylan M. Taylor 1546550b0d pptx/drawingml: upstream DeckCraft table caps, has_notes_slide, ModelError, and import_report (#2463)
* pptx/drawingml: upstream DeckCraft table caps, has_notes_slide, ModelError, and import_report (#792)

* drawingml(table): mark insert_row and insert_col #[must_use]
2026-11-19 20:01:09 -05:00
Dylan M. Taylor d0ca0cdb28 craft-mesh: add COLLADA (.dae) and Alembic (.abc) readers (#2462)
* craft-mesh: add COLLADA (.dae) and Alembic (.abc) readers

* fix(mesh): use str::to_owned instead of into_owned in dae

* craft-mesh: make dae and abc opt-in features

* fix(mesh): remove unused Error import and use Entry API in abc
2026-11-19 20:01:05 -05:00
Dylan M. Taylor 7258e42d8d ps: expose public PostScript token/lexer scanner (read::lex) (#2458)
* ps: expose public PostScript token/lexer scanner (read::lex)

* ps(lex): only mark stream fresh on Ok token

* fix(ps): allow clippy::should_implement_trait on Lexer::next
2026-11-19 19:55:29 -05:00
Dylan M. Taylor 512a1b8e8b mesh, image-codecs: add clearcoat/sheen GLB, obj_with_mtl, and EXR chromaticities (#778) (#2466)
* mesh, image-codecs: add clearcoat/sheen GLB, obj_with_mtl, and EXR chromaticities (#778)

* fix(mesh): import Image and TextureRef in obj tests

* fix(mesh): construct Mesh via struct literal in gltf test
2026-11-19 19:50:59 -05:00
Dylan M. Taylor 0ffb1a0abe xlsx, drawingml: track dropped cells and chart data tables/pivot source/first slice angle (#778) (#2465)
* xlsx, drawingml: track dropped cells and chart data tables/pivot source/first slice angle (#778)

* xlsx, drawingml: add unit tests for dropped_cells, ChartDataTable, first_slice_angle, pivot_source (#778)
2026-11-19 19:39:15 -05:00
Dylan M. Taylor 0275c0b107 html, xfdf: extract standalone HTML writer and XFDF annotation/FDF grammar (#778) (#2457)
* html, xfdf: add standalone HTML writer and XFDF annotation/FDF grammar (#778)

* html, xfdf: escape image mime attribute and clarify rich_plain vs direct_text
2026-11-19 19:38:35 -05:00
Dylan M. Taylor 6719b207fa craft-pdf: add fonts feature with PDF encodings and Standard-14 metrics (#2454)
* craft-pdf: add fonts feature with ISO 32000-2 Annex D encodings and Standard-14 metrics

* pdf(fonts): call crate::fonts::win_ansi in std14
2026-11-19 19:14:36 -05:00
Dylan M. Taylor ff98d8b93c fix(idml): remove unused imports in model test (#2467) 2026-11-19 19:07:33 -05:00
Terra854 f428c3d36e sqlite: add bounded wire decoding helpers (#2446) 2026-11-19 18:34:01 -05:00
Dylan M. Taylor 01c89f9a23 idml: add reusable designmap schema emission (#778) (#2455)
* idml: separate reusable designmap schema emission (#778)

* test(idml): split designmap schema roundtrip test for clippy
2026-11-19 18:32:24 -05:00
aiongg 0f23b31d1a Merge pull request #2438 from aiongg/update-hdiutil-eagain
craft-update: macOS install tests retry hdiutil while the disk-image helper is busy
2026-11-19 18:17:36 -05:00
FredApps ea9407b350 svg: share compact path command formatting (#778) [skip ci] (#2453) 2026-11-20 06:06:57 +07:00
42e0bd5482 Add a craft-raw decoder comparison example (#2417)
* Add a craft-raw decoder comparison example

* Clean up RAW decoder report test fixtures

* craft-raw: say the report hashes decoded samples and which revisions build it

The digest covers RawImage::data, after any decoder linearization, so the
README now says "decoded samples" and explains that two stored codes that
map to the same value give the same digest.

The copy-into-an-older-checkout instructions now name the first main
revision the example builds on (ecee6933, #1171): older revisions have no
Cfa origin fields.

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

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 05:50:06 +07:00
Dylan M. Taylor f7569cc7ae Merge pull request #2425 from dotCooCoo/fix/file-formats-jpeg-ls
file-formats: register JPEG-LS and tell it from JPEG
2026-11-19 17:46:57 -05:00
pancakeandpancake 352c589d89 RAW-DNG: gate JPEG XL tests on the codec feature (#2381)
The DNG integration target also runs when JPEG XL decoding is disabled.
Gate the five JPEG XL cases and their fixture helpers on the jxl feature
so a DNG-only test run checks the codecs available in that build.

The full JPEG XL regressions remain enabled when jxl is selected.

Co-authored-by: pancake <pancake@nopcode.org>
2026-11-19 17:45:24 -05:00
Mex a559fd3abc fix(mcp-server): reject invalid JSON-RPC versions before dispatch (#2444)
* fix(mcp): validate JSON-RPC versions before dispatch

Reject malformed request envelopes before tool or lifecycle effects. Companion to storytold/gridcraft#4210 after the shared-server migration.

* test(mcp): cover invalid version markers across transports

Actual shared crate: baseline 18 passed and 3 new regressions failed; fixed 21 passed. Repository formatting and strict production Clippy pass.
2026-11-19 17:41:52 -05:00
Terra854 6a5ff3d4fd psd: open merged composites without image resources (#2426) 2026-11-20 05:07:30 +07:00
Dylan M. Taylor 219c1d0b14 dxf: add shared .lin and .pat text parsers (#2434) 2026-11-19 16:25:57 -05:00
Dylan M. Taylor 9d5c9cce69 psd: add resource writers for alpha names and clipping path (2999) (#2429) 2026-11-19 16:25:53 -05:00
FredApps dc6adc3fbd psd: expose bounded encoded composite rows [skip ci] (#2442) 2026-11-20 04:22:22 +07:00
aiongg 6ec20913b0 craft-update: name std::time::Duration in the macOS test helper 2026-11-19 20:29:34 +00:00
aiongg bf6054c96d craft-update tests: retry hdiutil create and attach while the disk-image helper is busy 2026-11-19 20:24:41 +00:00
Dylan M. Taylor bc186ca719 image-codecs: keep first JFIF APP0 density in scan_metadata (#2422) 2026-11-19 14:51:45 -05:00
dotCooCoo a524687f93 file-formats: register JPEG-LS and tell it from JPEG
craft-image-codecs reads and writes JPEG-LS since #1576, but the
format registry had no entry for it. A `.jls` name resolved to no
format, and a JPEG-LS file was reported as JPEG because both start
with `FF D8 FF`.

`Format::JpegLs` now has the `jls` extension, the `image/jls` media
type and the codec mapping, so its capabilities come from the codec.

A file that starts with `FF D8 FF` is JPEG-LS when its marker segments
lead to an SOF55 frame header (`FF F7`). The walk follows
`jpeg_frame_from` in craft-image-codecs, which a build without the
`raster-codecs` feature does not link, and reads at most the first
1 MiB. When the bytes end before any frame header, a `.jls` name gives
JPEG-LS and any other name gives JPEG.

craft-file-import routes `JpegLs` to its raster reader and lists `jls`
and `image/jls`, so a JPEG-LS file still imports as it did when it was
detected as JPEG.

Follows #1576.
2026-11-19 11:02:50 -08:00
Dylan M. Taylor 08da5e1486 anicraft-format: add write_version for explicit envelope version (#2420) 2026-11-19 14:00:33 -05:00
Dylan M. Taylor 8dbe9705ff psd: detect Lr16/Lr32 and Mt* merged transparency in Merged::open (#2412) 2026-11-19 13:11:21 -05:00
Dylan M. Taylor 5d422c4f9d zip: add symlink detection and streaming writer destinations (#2411)
* zip: add symlink detection and streaming writer destinations

* Reject legacy UTF-8 mode from generic ZIP finish_into
2026-11-19 13:11:18 -05:00