decodeHdrFrame method

  1. @override
HdrImage? decodeHdrFrame(
  1. int frame
)
override

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.

Implementation

@override
HdrImage? decodeHdrFrame(int frame) {
  if (exrImage == null) {
    return null;
  }
  if (frame >= exrImage!.parts.length) {
    return null;
  }
  return exrImage!.parts[frame].framebuffer;
}