Contents

Image.DynamicRange

The range of brightness that an image is allowed to draw.

Declaration

struct DynamicRange

Overview

A high dynamic range image stores highlights brighter than white. Pass a value of this type to allowedDynamicRange(_:) to say how much of that extra brightness reaches the display:

Image("sunset")
    .allowedDynamicRange(.constrainedHigh)

Use high when the image is the subject of the screen and you want it at full brightness. Prefer constrainedHigh when the image appears next to an ordinary interface, because an unrestricted image can make the content around it look dim. standard holds the image to the same range as the rest of the interface.

Topics

Getting dynamic range values

See Also

Specifying dynamic range