Interface: ImageViewerProps
Props for ImageViewer. Settings props override the user's choice whenever they change.
Extends
Partial<ImageViewerSettings>
Properties
className?
optionalclassName?:string
Wrapper class name.
data?
optionaldata?:ArrayBuffer|Uint8Array<ArrayBufferLike>
Encoded file bytes; takes precedence over src.
exposure?
optionalexposure?:number
Exposure in stops (EV): 0 is unchanged, +1 doubles the brightness.
Inherited from
exposureControl?
optionalexposureControl?:boolean
Show the vertical exposure slider over the left edge.
fit?
optionalfit?:ImageFit
Inherited from
image?
optionalimage?:HdrifyImage
An already decoded image; takes precedence over data and src.
onError?
optionalonError?: (error) =>void
Called with fetch and decode errors; they are also shown in the viewer.
Parameters
error
Error
Returns
void
onLoad?
optionalonLoad?: (image) =>void
Called after each image loads and is drawn.
Parameters
image
Returns
void
onProgress?
optionalonProgress?: (progress) =>void
Called as the image downloads, decodes and is drawn.
Parameters
progress
Returns
void
onSettingsChange?
optionalonSettingsChange?: (settings) =>void
Called when the user changes a setting with the slider or the options panel.
Parameters
settings
Returns
void
onSettingsPanelChange?
optionalonSettingsPanelChange?: (mode) =>void
Called when the user opens or closes the options panel.
Parameters
mode
Returns
void
ref?
optionalref?:Ref<ImageViewerHandle>
Receives an ImageViewerHandle for readiness and image capture.
settingsPanel?
optionalsettingsPanel?:SettingsPanelMode
Initial state of the options panel. Defaults to closed.
src?
optionalsrc?:string
URL of an EXR, HDR or gain map JPEG (optionally gzipped). Fetching is cancelled when it changes.
style?
optionalstyle?:CSSProperties
Wrapper style; the default height is 480 pixels.
toneMapping?
optionaltoneMapping?:ToneMappingType