Commit Graph
2943 Commits
Author SHA1 Message Date
FredApps 9f46880bf5 Merge remote-tracking branch 'origin/main' into w1849
# Conflicts:
#	Cargo.toml
#	README.md
2026-11-16 13:01:00 +01:00
FredApps 57f94d5283 Merge pull request #1834 from andyching168/docx/wps-shape-vml-fallback
craft-docx: write Word 2010 shapes inside mc:AlternateContent with a VML fallback
2026-11-16 13:00:13 +01:00
FredApps b836a71856 craft-svg: a paths feature, and CSS colours with their alpha (#1848)
The geometry reader (craft_svg::paths) is the only part of the crate that
needs vectorcraft-geom and vectorcraft-pathops, and the tree is the only part
that needs craft-image-codecs. Both are now optional: paths is a default
feature and tree turns it on, so existing users build the same crate, while
an app that only needs SVG text, guards, path data, colours and the writer can
turn default features off and take no app crates or image codecs.

parse_color_alpha is parse_color keeping the alpha of #rgba, #rrggbbaa and
the fourth value of rgb()/hsl(). parse_color now calls it and still drops it.

Refs #778, #789
2026-11-16 06:54:06 -05:00
Dylan M. Taylor e409e74333 fix(print): opt-in bounded discovery for larger CUPS fleets (#1734)
* fix(print): allow explicitly bounded fleet discovery

* print: frame fleet discovery fixture as an HTTP reply
2026-11-16 06:49:02 -05:00
FredApps 070005125f Add craft-sniff: name a file's format, media type and extension from its first bytes (#1841) 2026-11-16 06:38:32 -05:00
FredApps 44d83fa8f6 Merge pull request #1323 from keithcsqueensu/xlsb-sizes
craft-xlsx: read row heights, column widths and default sizes of a binary sheet
2026-11-16 12:18:18 +01:00
FredApps eafb50aff3 Merge pull request #1653 from storytold/codex/dng-opcode-interpreter
Parse DNG opcode parameters into typed values
2026-11-16 12:03:21 +01:00
FredApps 806fa9a5a0 Merge pull request #1648 from storytold/codex/dng-capture-info
Share CinemaDNG capture metadata parsing
2026-11-16 12:02:33 +01:00
Dylan M. Taylor 37124f86d7 feat: add craft-mcp-server (JSON-RPC 2.0 MCP protocol) (#1649)
* feat: add craft-mcp-server (JSON-RPC 2.0 MCP protocol)

Port from solidcraft: MCP server machinery any app may share,
independent of transport and tools.

- JSON-RPC 2.0 over stdio (newline-delimited)
- MCP lifecycle: initialize, initialized, ping, notifications
- Tools: register, list, call with schema validation
- Resources: register, list, get by URI or template
- Prompts: register, list, get with argument completion
- Content blocks: text, image (base64), progress tokens

No external dependencies beyond serde_json.
Follows craft-libs safety pattern: #![deny(clippy::unwrap_used, ...)]

* retrigger CI

* retrigger CI

* Record MCP server dependencies in workspace lockfile

* chore: update rustls-webpki 0.103.15→0.103.16 and zip 9.1.0→9.1.3
2026-11-16 06:02:29 -05:00
FredApps 5ff3dd85b8 Merge pull request #1647 from storytold/codex/dng-metadata
Share bounded DNG processing and camera metadata
2026-11-16 11:56:50 +01:00
65848bfe29 Add craft-macho: Mach-O slice tables and header names from Craft Anything
Moves the header pieces of Craft Anything's crates/formats/src/macho.rs
into a pure-Rust crate: fat_slices (fat and fat64), FatSlice, cpu_name,
load_command_name, load_command_min_size, nibble_version and
unixthread_pc. The load command walker, symbols, stubs and Objective-C
metadata stay in the app.

Part of #778.

Co-authored-by: Afloat <ShuffleMonkey@163.com>
Co-authored-by: BFlat <bombayapirat@gmail.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Cr <60964294+Chr0mium24@users.noreply.github.com>
Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
2026-11-16 11:47:05 +01:00
Dylan M. Taylor 731c4f262a Merge pull request #1758 from dotCooCoo/fix/exr-deep-part-tables-end
craft-exr: deep chunk offsets start after every part's offset table
2026-11-16 05:46:49 -05:00
Dylan M. Taylor 8a83e9178d Merge pull request #1837 from ljkx/image-codecs-bmp-resolution
image-codecs: BMP keeps its resolution in the header's pixels per metre
2026-11-16 05:45:26 -05:00
FredApps 341020b2c1 Merge pull request #1757 from el-j/feat/video-mjpeg
craft-video: Motion JPEG decoder and encoder (mjpeg)
2026-11-16 11:18:40 +01:00
FredApps 9b87ff0a0e raw: dng_metadata checks the LinearizationTable count before reading its entries 2026-11-16 10:34:00 +01:00
FredApps 57288edafd Merge pull request #1693 from storytold/codex/edl-bounded-report
Support bounded EDL parse diagnostics
2026-11-16 10:33:09 +01:00
FredApps 6abb8cf77e Merge main into XLSB sizes, preserving shared styles and regression coverage 2026-11-16 10:20:21 +01:00
FredApps 5689c73d29 Merge pull request #1685 from storytold/codex/fcp7-bounded-report
Support bounded FCP7 diagnostics
2026-11-16 10:17:11 +01:00
FredApps a4e74a5290 Merge pull request #1645 from storytold/codex/shared-dng-opcode-envelope
raw: share bounded DNG opcode envelopes
2026-11-16 10:09:02 +01:00
FredApps 4b69e41374 Merge pull request #1646 from storytold/codex/shared-raw-exif
Share explicit raw EXIF and JPEG APP metadata helpers
2026-11-16 10:05:47 +01:00
ljkx 7adcc9a6c2 image-codecs: BMP keeps its resolution in the header's pixels per metre
A BMP stores its resolution in biXPelsPerMeter and biYPelsPerMeter
(BITMAPINFOHEADER and later). The image crate writes 0 there and nothing
read the fields, so a 300 ppi image saved as BMP reopened at 72 ppi and an
opened BMP's resolution was lost (storytold/photocraft#13630).

decode now reads the fields into Metadata::dpi, encode writes
Metadata::dpi into them whatever embed_metadata says, and
caps(Format::Bmp).dpi is true. encode_bmp_indexed_with_dpi is the palette
writer with a resolution; encode_bmp_indexed keeps its signature and output.
2026-11-16 10:05:03 +01:00
FredApps a5c59b3d7c Merge pull request #1644 from storytold/codex/shared-dng-raw
raw: share bounded DNG strip and tile decoding
2026-11-16 10:00:06 +01:00
FredApps 80fea1fcab Merge pull request #1832 from storytold/fix/exr-display-block-bound
fix(exr): bound the display decoder by its largest block, not the whole part
2026-11-16 09:42:09 +01:00
FredApps a53b894e08 Merge remote-tracking branch 'origin/codex/fcp7-bounded-report' into w1693 2026-11-16 08:54:47 +01:00
FredApps 52fe6cb6cb Merge remote-tracking branch 'origin/main' into w1685
# Conflicts:
#	crates/timeline/src/fcp7.rs
#	crates/timeline/tests/it/fcp7.rs
2026-11-16 08:54:28 +01:00
FredApps 7d08706a3d Merge pull request #1681 from storytold/codex/fcpxml-bounded-report
Support bounded FCPXML diagnostics
2026-11-16 08:53:32 +01:00
FredApps cd845444f6 Merge remote-tracking branch 'origin/codex/dng-capture-info' into w1653 2026-11-16 08:52:13 +01:00
FredApps d8a2de2224 Merge remote-tracking branch 'origin/codex/dng-metadata' into w1648 2026-11-16 08:52:09 +01:00
FredApps 2686ac1f95 Merge remote-tracking branch 'origin/codex/shared-dng-opcode-envelope' into w1647 2026-11-16 08:52:05 +01:00
FredApps 456e71da87 Merge remote-tracking branch 'origin/codex/shared-dng-raw' into w1645 2026-11-16 08:52:01 +01:00
FredApps 8a067d58d0 raw: dng_lines checks unpack sizes, budgets each chunk's real decode allocation, and allows subsampled lossy JPEG
- unpack: checked sample, row-bit and output products, capped at MAX_SAMPLES before allocating
- every chunk is charged what its decoder may allocate (lossless: coded rows + 1/8; lossy: the
  32-pixel MCU-padded tile) against the aggregate budget before decoding, the lossless decoder
  is held to that, and truncated capacity is released
- the lossy encoded-size floor allows 64 x spp samples per two-bit block (chroma subsampling)
2026-11-16 08:51:58 +01:00
Andy Ching 5033f10bf2 craft-docx: keep behind-text shapes' order in the VML fallback
A behind-text shape's fallback `z-index` was the negated `z`, which
reverses the order of overlapping behind-text shapes. It is now `z`
shifted below zero within signed 32-bit range, so a higher `z` still
stacks higher; other shapes' `z-index` is capped at `i32::MAX`.
2026-11-16 15:51:31 +08:00
FredApps b952ca0231 Merge pull request #1728 from storytold/codex/fbx-ordered-placements
Preserve FBX placement and polygon order
2026-11-16 08:44:23 +01:00
FredApps 33f35d74f8 exr: clamp the scan-line block bound to the part height
A part shorter than its compression's scan-line group (a one-row ZIP16 part) only decodes its
own rows, so the all-channel block bound is min(scan_lines_per_block, layer_h) rows.
2026-11-16 08:38:50 +01:00
FredApps cb111c2ea6 Merge pull request #1733 from storytold/codex/shared-paragraph-composer
Share paragraph-wide line composition
2026-11-16 08:37:53 +01:00
FredApps 250fc97fa8 raw: opcode_params reads areas as the shared opcodes::Area and clamps them (Area::clamp); document how it differs from the typed opcodes model 2026-11-16 08:36:26 +01:00
FredApps 0e4b33fdf0 Merge remote-tracking branch 'origin/codex/dng-capture-info' into w1653 2026-11-16 08:35:30 +01:00
FredApps 7feff2a02d raw: dng_metadata::Timecode is the crate Timecode; share the CinemaDNG frame-rate range with dng.rs
Removes the duplicated Timecode type and BCD decoder (Sonar duplication 28%) and the copied
frame-rate plausibility check; capture_info is tested against the full reader's CinemaTags.
2026-11-16 08:35:12 +01:00
FredApps 77125b817f Merge remote-tracking branch 'origin/codex/dng-metadata' into w1648 2026-11-16 08:34:03 +01:00
FredApps 6225363b1f raw: dng_metadata tests against hand-built DNGs and the full reader; document why it keeps its own tag reads 2026-11-16 08:33:43 +01:00
FredApps b611b03a29 Merge remote-tracking branch 'origin/codex/shared-dng-opcode-envelope' into w1647 2026-11-16 08:32:30 +01:00
Andy Ching 489f3cbc12 craft-docx: guard a shape only when it gets a VML fallback; keep more in the fallback
A shape guarded by `mc:AlternateContent` with no fallback is skipped by
a reader that doesn't know `wps`, and dropped on that reader's next save:
worse than refusing the file. Such shapes are written bare again; only
shapes with a VML form are guarded.

The VML fallback also keeps the shape's own stacking order (a floating
object in its text box moved `self.z` on), its wrap distances, its hidden
flag and its text box's text direction.
2026-11-16 15:32:11 +08:00
FredApps 89e96d2790 raw: opcodes::parse_list/write_list use the opcode_raw envelope walker and encoder
One opcode-list envelope implementation: opcode_raw::Records walks the records (stopping at a
truncated one) for both the strict opcode_raw::parse and the typed opcodes::parse_list, and
opcodes::write_list encodes through opcode_raw::encode instead of truncating lengths with as.
2026-11-16 08:32:10 +01:00
FredApps 456b7d5b35 Merge remote-tracking branch 'origin/codex/shared-dng-raw' into w1645 2026-11-16 08:30:57 +01:00
FredApps e8aed7cfa6 image-codecs: find the JPEG EXIF APP1 by walking segments and bound the copy by its length
An Exif signature inside a COM segment was taken for the EXIF APP1, and the copy was checked
only against the end of the file, so a replacement longer than the APP1 overwrote the next
marker. Walk the header segments to the first EXIF APP1 and copy only within its declared length.
2026-11-16 08:30:28 +01:00
FredApps 59d28093e6 raw: dng_lines reuses the DNG reader's unpackers and JPEG decoder, drops the image dependency
- uncompressed rows go through crate::unpack (read_u16s / unpack_msb), as in dng.rs
- lossy JPEG tiles (34892) use tiffraw::lossy_jpeg_with_tile (zune-jpeg) with its tile-size checks
- line-dng now implies dng instead of pulling in image
- tests: every layout and compression read against the full reader, refusals, unpack depths
2026-11-16 08:27:55 +01:00
FredApps 3fd0383c81 Merge remote-tracking branch 'origin/main' into w1644 2026-11-16 08:20:40 +01:00
FredApps 4ffa307f1a Merge pull request #1407 from AlexChambers/craft-heif/primary-item-metadata
craft-heif: items reads the primary image's EXIF and XMP; add scan for every metadata item
2026-11-16 08:19:32 +01:00
Andy Ching 741192a57c craft-docx: write Word 2010 shapes inside mc:AlternateContent with a VML fallback
A shape was written as a bare `wps:wsp` in `w:drawing`. Word 2007, and
Word 2000-2003 with the Office Compatibility Pack, don't know `wps` and
refuse the whole file. Word writes such shapes in `mc:AlternateContent`.

`write_shape` now guards the drawing with `mc:Choice Requires="wps"` and,
for rectangles, text boxes, rounded rectangles and ellipses, adds an
`mc:Fallback` with the shape as VML: size, position, z-order, wrapping,
fill, outline and the text box's text (copied from the choice's output,
so the story isn't written twice). Other kinds get no fallback; an old
reader skips that shape and still opens the file.

Refs storytold/wordcraft#6849
2026-11-16 15:15:06 +08:00
FredApps 15aaced60a fix(exr): bound the display decoder by its largest block, not the whole part
decode_display_part refused a part whose data window across all channels
exceeded max_bytes, even when the kept planes fit. The EXR crate decompresses
one block at a time, so bound the largest all-channel block (a tile within the
data window, or one scan-line group across it) instead. Large multi-layer
files whose picture planes fit now decode; the selected-plane and file
capacity checks are unchanged.
2026-11-16 07:47:17 +01:00