HdrSlice class

A slice is the data for an image framebuffer for a single channel.

Constructors

HdrSlice(String? name, int width, int height, int type, int bitsPerSample)
HdrSlice.from(HdrSlice other)
Create a copy of the other HdrSlice.

Properties

bitsPerSample int
How many bits per sample, either 8, 16, 32, or 64.
final
data List
data will be one of the type data lists, depending on the type and bitsPerSample. 16-bit FLOAT slices will be stored in a Uint16List.
final
hashCode int
The hash code for this object.
no setterinherited
height int
final
isFloat bool
Does this channel store floating-point data?
no setter
name String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type int
Indicates the type of data stored by the slice, either HdrImage.INT, HdrImage.FLOAT, or HdrImage.UINT.
final
width int
final

Methods

getBytes() Uint8List
Get the raw bytes of the data buffer.
getFloat(int x, int y) double
Get the float value of the sample at the coordinates x,y. Half samples are converted to double.
getInt(int x, int y) int
Get the int value of the sample at the coordinates x,y. An exception will occur if the slice stores FLOAT data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setFloat(int x, int y, num v) → void
Set the float value of the sample at the coordinates x,y for FLOAT slices.
setInt(int x, int y, int v) → void
Set the int value of the sample at the coordinates x,y for INT and UINT slices.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

allocateDataForType(int size, int type, int bitsPerSample) List