AiutaAdaptiveImage
Displays an image adaptively depending on its aspect ratio:
aspectRatio >= aspectThreshold → ContentScale.Crop, the image fills the container without side gaps (cover).
aspectRatio <aspectThreshold → ContentScale.Fit (the whole subject stays visible), with the empty side areas filled by a blurred, slightly scaled, color-graded copy of the same image (contain + blurred background).
The foreground is loaded at the view size via rememberConstraintsSizeResolver (instead of Size.ORIGINAL), so large source images aren't decoded at full resolution. The cover / contain decision is driven by a separate probe painter decoded at a fixed size, so the same image yields the same aspect ratio (and thus the same mode) on every device, independent of container size.
The blur is produced by decoding a tiny copy of the same image via Coil and upscaling it, then (where supported) a real Modifier.blur on top — blur is a no-op below Android API 31, so the downsample alone provides the softening there.
Parameters
The corner radius used to clip the container (and the shimmer placeholder).
The content description for accessibility.
The modifier applied to the root container. Callers should put sizing and any container-level modifiers (e.g. hazeSource, onGloballyPositioned, click) here.
The alignment of the image within its bounds.
The width/height boundary between cover and contain+blur.
Optional callback reporting the rect (in root coordinates) actually occupied by the painted image. In cover mode this equals the container; in contain mode it is the Fit-letterboxed sub-rect, so callers (e.g. shared-element zoom) animate from the real image bounds instead of the whole view.