colorspace op• Data kinds: rgb → rgb
• Call: import fullseye as fs; fs.ledger.linear_to_srgb(img) (to call the implementation directly, import gfx2d; gfx2d.linear_to_srgb(img); from the registry, opsgfx2d.get("linear_to_srgb"))
Linear light back to sRGB encoding. Exact inverse of srgb_to_linear.
Formula (IEC 61966-2-1): 12.92 c if c <= 0.0031308, otherwise 1.055 c^(1/2.4) - 0.055. Independent per channel and per pixel.
• img: float of shape (H, W) / (H, W, 1) / (H, W, 3) / (H, W, 4). Values must be in [0, 1] (tolerance 1e-9), otherwise ValueError -- HDR values of linear light (above 1) must first be brought into range by applying exposure. Integer arrays pass only when the maximum is at most 1 (0-255 buffers are rejected). bool passes as 0/1. NaN/Inf, complex numbers and masked arrays give ValueError.
• The alpha of (H, W, 4) (the 4th channel) is not converted (coverage is linear to begin with).
• Return value: a float64 copy of the same shape, [0, 1].
• 1 colour as (3,) or a colour table (N, 3) is not accepted by this op (image API). To apply it to arbitrary shapes, the function of the same name on the imgmetrics side delegates to this one.
Apply it exactly 1 time to results computed in linear light, such as radial_light / light_mask / bloom, right before writing to a file or showing on screen. Applying it twice lifts the midtones (no exception is raised).
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• gfx2d_scene — py -3.11 examples/gfx2d_scene.py
• poc_leaf_disease_area — py -3.11 examples/poc_leaf_disease_area.py
• poc_pigment_unmixing — py -3.11 examples/poc_pigment_unmixing.py
• poc_white_balance — py -3.11 examples/poc_white_balance.py
rgb as input)srgb_to_linear · blend_mode · light_mask · normal_map_decode · bloom · vignette · chromatic_aberration · film_grain
colorspace)*Provenance: gfx2d.py — GFX2D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.