ImageDynamicRange
The range of brightness that an image is allowed to draw.
Declaration
type ImageDynamicRange = 'constrainedHigh' | 'high' | 'standard';struct DynamicRangePass a literal, or build one with SwiftUI.ImageDynamicRange from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'constrainedHigh'SwiftUI.ImageDynamicRange.constrainedHighAllow image content to use some extended range. This is appropriate for placing HDR content next to SDR content.
'high'SwiftUI.ImageDynamicRange.highAllow image content to use an unrestricted extended range.
'standard'SwiftUI.ImageDynamicRange.standardRestrict the image content dynamic range to the standard range.
Overview
A high dynamic range image stores highlights brighter than white. Pass a
value of this type to Image.allowedDynamicRange(_:) to say how much
of that extra brightness reaches the display:
Image("sunset")
.allowedDynamicRange(.constrainedHigh)Use Image.DynamicRange.high when the image is the subject of the
screen and you want it at full brightness. Prefer
Image.DynamicRange.constrainedHigh when the image appears next to an
ordinary interface, because an unrestricted image can make the content
around it look dim. Image.DynamicRange.standard holds the image to
the same range as the rest of the interface.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
See also
More in Visual effects.