Skip to main content

Interface: ImageViewerProps

Props for ImageViewer. Settings props override the user's choice whenever they change.

Extends​

Properties​

className?​

optional className?: string

Wrapper class name.


data?​

optional data?: ArrayBuffer | Uint8Array<ArrayBufferLike>

Encoded file bytes; takes precedence over src.


exposure?​

optional exposure?: number

Exposure in stops (EV): 0 is unchanged, +1 doubles the brightness.

Inherited from​

ImageViewerSettings.exposure


exposureControl?​

optional exposureControl?: boolean

Show the vertical exposure slider over the left edge.


fit?​

optional fit?: ImageFit

Inherited from​

ImageViewerSettings.fit


image?​

optional image?: HdrifyImage

An already decoded image; takes precedence over data and src.


onError?​

optional onError?: (error) => void

Called with fetch and decode errors; they are also shown in the viewer.

Parameters​

error​

Error

Returns​

void


onLoad?​

optional onLoad?: (image) => void

Called after each image loads and is drawn.

Parameters​

image​

HdrifyImage

Returns​

void


onProgress?​

optional onProgress?: (progress) => void

Called as the image downloads, decodes and is drawn.

Parameters​

progress​

ImageViewerProgress

Returns​

void


onSettingsChange?​

optional onSettingsChange?: (settings) => void

Called when the user changes a setting with the slider or the options panel.

Parameters​

settings​

ImageViewerSettings

Returns​

void


onSettingsPanelChange?​

optional onSettingsPanelChange?: (mode) => void

Called when the user opens or closes the options panel.

Parameters​

mode​

SettingsPanelMode

Returns​

void


ref?​

optional ref?: Ref<ImageViewerHandle>

Receives an ImageViewerHandle for readiness and image capture.


settingsPanel?​

optional settingsPanel?: SettingsPanelMode

Initial state of the options panel. Defaults to closed.


src?​

optional src?: string

URL of an EXR, HDR or gain map JPEG (optionally gzipped). Fetching is cancelled when it changes.


style?​

optional style?: CSSProperties

Wrapper style; the default height is 480 pixels.


toneMapping?​

optional toneMapping?: ToneMappingType

Inherited from​

ImageViewerSettings.toneMapping