lib-image · crate
kinogaki-image
The owned image every lib-image format decodes to and encodes from.
- Repository
- lib-image (kinogaki/lib-image)
- Folder
libs/lib-image/crates/image- Source
- 3 files, 336 lines
- Tests
- 0 files, 0 lines
What it is
The owned image every lib-image format decodes to and encodes from.
An Image is channels interleaved samples per pixel, rows top to bottom, straight (not premultiplied) alpha. Integer samples are display-referred (sRGB coded for color); float samples are scene-linear, as OpenEXR stores them. Half floats are kept as their IEEE 754 binary16 bits (f16_to_f32, f32_to_f16) since Rust's f16 is not stable.
Depends on
None.
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-exr-format | OpenEXR | normal | OpenEXR, a format plugin: an EXR file reads as one standard Image, every part's channels its layers, and an Image writes as one EXR, Cryptomatte included. |
kinogaki-jpeg-format | JPEG | normal | JPEG, a format plugin: a JPEG reads as one standard Image as the file holds it, and an Image writes as one baseline JPEG. |
kinogaki-png | lib-image | normal | PNG images (ISO/IEC 15948, W3C PNG Third Edition) over kinogaki_deflate. |
Modules
half(private)IEEE 754 binary16 conversions, exact both ways: every half is a float, and a float rounds to the nearest half, ties to even, overflowing to infinity; NaNs stay NaNs (quiet, top payload bits kept).100 linessrgb(private)The sRGB transfer curve (IEC 61966-2-1) from linear floats to 8-bit codes, rounded to nearest: codencovers the linear values between the decodings ofn - 0.5andn + 0.5, so a binary search over those 255 boundaries gives the exact rounding without a ...50 lines
Public types and traits
At the crate root
Structs ImageSizeError
Enums Samples
