ExrDecoder class

Decode an OpenEXR formatted image.

OpenEXR is a format developed by Industrial Light & Magic, with collaboration from other companies such as Weta and Pixar, for storing high dynamic range (HDR) images for use in digital visual effects production. It supports a wide range of features, including 16-bit or 32-bit floating-point channels; lossless and lossy data compression; arbitrary image channels for storing any combination of data, such as red, green, blue, alpha, luminance and chroma channels, depth, surface normal, motion vectors, etc. It can also store images in scanline or tiled format; multiple views for stereo images; multiple parts; etc.

Because OpenEXR is a high-dynamic-range (HDR) format, it must be converted to a low-dynamic-range (LDR) image for display, or for use as an OpenGL texture (for example). This process is called tone-mapping. Currently only a simple tone-mapping function is provided with a single exposure parameter. More tone-mapping functionality will be added.

Inheritance

Constructors

ExrDecoder({double exposure = 1.0})

Properties

bloomAmount double?
getter/setter pair
bloomRadius double?
getter/setter pair
exposure double
Exposure for tone-mapping the hdr image to an Image, applied during decodeFrame.
getter/setter pair
exrImage ExrImage?
getter/setter pair
gamma double?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
reinhard bool?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeAnimation(List<int> bytes) Animation?
Decode all of the frames from an animation. If the file is not an animation, a single frame animation is returned. If there was a problem decoding the file, null is returned.
override
decodeFrame(int frame) Image?
Decode a single frame from the data that was set with startDecode. If frame is out of the range of available frames, null is returned. Non animated image files will only have frame 0. An Image is returned, which provides the image, and top-left coordinates of the image, as animated frames may only occupy a subset of the canvas.
override
decodeHdrFrame(int frame) HdrImage?
Decode a single high dynamic range (HDR) frame from the data that was set with startDecode. If the format of the file does not support HDR images, the regular image will be converted to an HDR image as (color / 255). If frame is out of the range of available frames, null is returned. Non animated image files will only have frame 0. An Image is returned, which provides the image, and top-left coordinates of the image, as animated frames may only occupy a subset of the canvas.
override
decodeHdrImage(List<int> bytes, {int frame = 0}) HdrImage?
Decode the file and extract a single High Dynamic Range (HDR) image from it. HDR images are stored in floating-poing values. If the format of the file does not support HDR images, the regular image will be converted to an HDR image as (color / 255). If the file is animated, the specified frame will be decoded. If there was a problem decoding the file, null is returned.
override
decodeImage(List<int> bytes, {int frame = 0}) Image?
Decode the file and extract a single image from it. If the file is animated, the specified frame will be decoded. If there was a problem decoding the file, null is returned.
override
isValidFile(List<int> bytes) bool
A light-weight function to test if the given file is able to be decoded by this Decoder.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numFrames() int
How many frames are available to be decoded. startDecode should have been called first. Non animated image files will have a single frame.
override
startDecode(List<int> bytes) DecodeInfo?
Start decoding the data as an animation sequence, but don't actually process the frames until they are requested with decodeFrame.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited