vips-sys

Upstream and binding review — 2026-11-29

Selected revision

Both repositories completed git pull --ff-only on main. Existing local manifest/lockfile dependency updates are included in this delivery, including cc 1.12.0. The previous native/cross-platform CI runs for both November 7 commits completed successfully.

The vendor source and native CI move from 8.19.0-rc1 to 8.19.0-rc4, commit eef6e64bb3d956be6c3757873fa3e0631b65cd3e, published November 28. The latest stable release is 8.18.8, published November 27. RC4 also merges that stable maintenance branch. The selected master and RC4 point to the same revision. RC4 release Stable release

Version 0.5.0 prepares the binding update in Git. Publication remains deferred. The minor bump reflects upstream’s removal of a public constant. Header version 8.19.0 is identical across these release candidates, so a numeric version probe cannot distinguish RC1 from RC4. Use the pinned source for the expanded API.

Public surface audit

The stable 8.18.7-to-8.18.8 public-header comparison has no changes. The RC1-to-RC4 comparison produces six added function declarations, increasing coverage from 1,175 to 1,181. All six additions were verified in the compiled export table.

Addition Purpose
vips_UHDR2scRGB New canonical UltraHDR conversion entry point
vips__token_must, vips__token_need Exported token parser helpers used by modules
vips__token_segment, vips__token_segment_need Exported parser segment helpers
vips__find_rightmost_brackets Exported option-string parser helper

The double-underscore functions follow upstream’s module-helper naming and are available through unsafe FFI. The legacy vips_uhdr2scRGB still exists. vips__image_get_clli and other CICP internals are declared in internal.h and remain outside the public wrapper header.

VipsForeignSaveable gains CICP = 16 and scRGB = 32, moving ALL to 63. Three VIPS_FOREIGN_*_ALL_MASK constants are provided under v8_19 because bindgen omits macros whose expressions refer to enum members. Public struct layouts are unchanged in this header comparison.

VIPS_UHDR_TO_SCRGB was removed upstream after HDR reference-white normalization. The Rust constant is removed in 0.5.0. Binding refresh now checks constant removals as well as function removals and requires an explicit named constant exception. The guard was exercised with the prior prebuilt file, failing without approval and passing with only VIPS_UHDR_TO_SCRGB approved.

Behavior and performance changes

Findings and follow-up

High priority, mitigated in the safe wrapper. RC4’s libvips/colour/CICP2scRGB.c::vips_CICP2scRGB_build assigns operation override fields but constructs its matrix/LUT from local values read from image metadata. An sRGB override on linear-tagged pixel 128 produced 0.501961 rather than the expected 0.215861. Missing or malformed metadata leaves those native locals uninitialized. vips-rs now validates complete supported metadata, and explicit overrides are applied on a fresh lazy image header. This preserves the original image metadata and avoids copying pixel storage. Raw FFI callers retain the native caller obligations. A future native fix should cover integer and float inputs, override precedence, malformed metadata and HDR reference white.

Open upstream limitation. Valid QOI data produced by the RC4 encoder still fails vips_thumbnail_buffer with qoiload_source: bad QOI magic. A standalone C program reproduces this. Direct QOI file/buffer round trips pass. The native source reopen/header-position path remains follow-up work.

Further priorities include typed HEIF encoder options, valid RAW decode fixtures, APNG multi-frame tests, native Windows ABI checks and end-to-end codec/SIMD benchmarks. The new alpha benchmark covers one materialized processing workload.

Merged PR inventory

GitHub’s 100 most recently updated closed PRs were read and filtered for merges since November 7. 31 matched. Merge-commit ancestry was checked against RC4, including the merged 8.18 maintenance branch. This is a bounded recent-update inventory.

PR Merged UTC Base Change In RC4
#5352 2026-11-28 master dcrawload: don’t fail when a preview can’t be unpacked yes
#5354 2026-11-28 master uhdrload: read the base image sequentially and with fail_on yes
#5350 2026-11-28 master UHDR2scRGB: apply RGB gainmaps in the base or gainmap gamut yes
#5351 2026-11-28 master uhdrsave: apply keep to a gainmap image yes
#5348 2026-11-27 8.18 v8.18.8 release proposal yes
#5349 2026-11-26 master unpremultiply: add guard against uchar with non-uchar images yes
#5347 2026-11-25 master Fix #5346 missing errno.h header yes
#5345 2026-11-25 master Regenerate C++ binding yes
#5343 2026-11-25 master heifsave: add encoder options string yes
#5344 2026-11-24 master CICP2scRGB: add metadata overrides yes
#5335 2026-11-23 8.18 tiffload: take a copy of the JPEG Huffman tables inside mutex yes
#5339 2026-11-23 8.18 cplusplus: prevent error buffer race condition yes
#5341 2026-11-23 master uhdrsave: don’t save large exif yes
#5340 2026-11-23 8.18 abs: guard against integer overflow yes
#5336 2026-11-20 master CIFuzz: install GLib wrap dynamically for TSan builds yes
#5309 2026-11-19 master premultiply: add fast path for uchar RGBA images yes
#5333 2026-11-18 master docs: add Swift library (Hokusai) to README yes
#5328 2026-11-17 master dcrawload: load as CICP tagged Linear Rec.2020 yes
#5332 2026-11-17 master colour: add built-in Linear Rec.2020 profile yes
#5308 2026-11-17 master Fix uhdr to avif yes
#5330 2026-11-16 master add missing CICP doc comments yes
#5331 2026-11-16 8.18 libnsgif: update from upstream yes
#5329 2026-11-16 8.18 tiff: require libtiff >= 4.2.0 for IPTC metadata yes
#5326 2026-11-15 master radload: support packed XYZE images yes
#5325 2026-11-14 8.18 Ensure image history is restored on load yes
#5324 2026-11-14 8.18 dbuf: fix return value of vips_dbuf_writef() yes
#5323 2026-11-14 8.18 jxlload: limit total multipage/animated height yes
#5307 2026-11-12 8.18 text: prevent fontconfig init race condition yes
#5304 2026-11-12 master rename uhdr2scRGB -> UHDR2scRGB yes
#5299 2026-11-12 master Revise scRGB2CICP yes
#5298 2026-11-09 master Add vips image get clli yes

Validation

Stable Rust 1.100.0, native RC4 with Highway, PNG/JPEG, TIFF, WebP, libraw, libultrahdr and lcms2. Generated/default binding tests and Clippy pass. The six new symbols are exported. Companion RC4 image, UltraHDR, CICP, alpha, initialization and lifetime tests pass. Native 8.18.8 compatibility tests, header-free stub tests, the Cargo static vendor builder, rustdoc, formatting and workflow lint pass. Valid RAW, HEIF/JXL, APNG and native Windows RC4 execution remain additional coverage work.