Files
Dylan M. TaylorandTed Mao 305bc3c971 Add craft-gainmap: ISO 21496-1, hdrgm and Apple gain maps, from LightCraft (#904)
* Add craft-gainmap: ISO 21496-1 and hdrgm gain map metadata, compute and apply, from LightCraft

Moved from lightcraft-codecs' gainmap.rs at 8ef35987 with its tests: the metadata reader and
writer and the arithmetic. The JPEG container (MPF index, two encoded images) stays in the app.

* craft-gainmap: Apple legacy gain-map reconstruction

Apple's legacy single-channel gain maps interpolate a linear gain ratio, not the log2 gain of
ISO 21496-1: apple::apply rebuilds the HDR rendition from a decoded base and the map, with the
headroom taken from the maker-note pair or the HDRGainMapHeadroom tag, checked inputs and
pixel-centre sampling.

Ported from storytold/lightcraft#3760 (which carries #1978).

---------

Co-authored-by: Ted Mao <tedmao@gmail.com>
2026-11-11 17:07:37 -05:00

15 lines
391 B
TOML

[package]
name = "craft-gainmap"
description = "HDR gain maps (ISO 21496-1, Adobe hdrgm, Apple): metadata reader and writer, and the arithmetic that measures and applies a gain map."
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
[lints]
workspace = true
[dependencies]
thiserror = { workspace = true }