Skip to main content

Module image_io

Module image_io 

Source
Expand description

Format-aware image opening.

Wraps image::open so:

  • HEIC/HEIF (every modern iPhone photo) decodes through libheif when the heic Cargo feature is enabled, fails clearly otherwise.
  • TIFF-based RAW (NEF / CR2 / CR3 / ARW / DNG / ORF / RW2 / PEF / RWL / SRW) decodes via the camera’s embedded full-res JPEG preview when the raw feature is on (default).
  • Everything else falls through to the image crate.

Call this from any code path that previously did image::open(...) — thumbnail generation, face detection, brightness sampling.

Functions§

open_image
Open and decode an image. Returns a fully-decoded DynamicImage regardless of the on-disk format. HEIC/HEIF route through libheif when compiled in; RAW files route through raw_preview to extract the embedded full-res JPEG preview (the camera’s intended rendering, much better than software-debayered output without proprietary colour profiles); everything else uses the image crate’s native decoders.