HdrImage class Null safety
A high dynamic range RGBA image stored in 16-bit or 32-bit floating-point channels.
Constructors
- HdrImage()
- HdrImage.create(int? width, int? height, int channels, int type, int bitsPerSample)
- Create an RGBA image.
- HdrImage.from(HdrImage other)
-
Create a copy of the
other
HdrImage. - HdrImage.fromImage(Image other, {int type = FLOAT, int bitsPerSample = 16})
-
Create an HDR image from a LDR Image by transforming the channel values
to the range
0, 1
.
Properties
- alpha ↔ HdrSlice?
-
read / write
- bitsPerSample → int
-
The number of bits per sample.
read-only
- blue ↔ HdrSlice?
-
read / write
- depth ↔ HdrSlice?
-
read / write
- green ↔ HdrSlice?
-
read / write
- hasAlpha → bool
-
Does the image have an alpha channel?
read-only
- hasColor → bool
-
Does the image have any color channels?
read-only
- hasDepth → bool
-
Does the image have a depth channel?
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- height → int
-
The height of the framebuffer.
read-only
- numberOfChannels → int
-
The number of channels used by the image
read-only
- red ↔ HdrSlice?
-
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- sampleFormat → int
-
read-only
-
slices
→ Map<
String?, HdrSlice> -
final
- width → int
-
The width of the framebuffer.
read-only
Methods
-
addSlice(
HdrSlice slice) → void -
Add a channel
slice
to the -
getAlpha(
int x, int y) → num -
Get the value of the alpha channel at the given pixel coordinates
x
,y
. -
getBlue(
int x, int y) → num -
Get the value of the blue channel at the given pixel coordinates
x
,y
. -
getDepth(
int x, int y) → num -
Get the value of the depth channel at the given pixel coordinates
x
,y
. -
getGreen(
int x, int y) → num -
Get the value of the green channel at the given pixel coordinates
x
,y
. -
getRed(
int x, int y) → num -
Get the value of the red channel at the given pixel coordinates
x
,y
. -
hasChannel(
String? ch) → bool - Does this image contain the given channel?
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
setAlpha(
int x, int y, num c) → void -
Set the value of the alpha channel at the given pixel coordinates
x
,y
. -
setAlphaInt(
int x, int y, int c) → void -
setBlue(
int x, int y, num c) → void -
Set the value of the blue channel at the given pixel coordinates
x
,y
. -
setBlueInt(
int x, int y, int c) → void -
setDepth(
int x, int y, num c) → void -
Set the value of the depth channel at the given pixel coordinates
x
,y
. -
setGreen(
int x, int y, num c) → void -
Set the value of the green channel at the given pixel coordinates
x
,y
. -
setGreenInt(
int x, int y, int c) → void -
setRed(
int x, int y, num c) → void -
Set the value of the red channel at the given pixel coordinates
x
,y
. -
setRedInt(
int x, int y, int c) → void -
toFloatRgba(
) → Float32List - Convert the framebuffer to an floating-point image, as a sequence of floats in RGBA order.
-
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
-
operator [](
String? ch) → HdrSlice? - Access a framebuffer slice by name.
Constants
- A → const String
-
Alpha/opacity
'A'
- B → const String
-
Blue value of a sample
'B'
- FLOAT → const int
-
3
- G → const String
-
Green value of a sample
'G'
- ID → const String
-
A numerical identifier for the object represented by a sample.
'id'
- INT → const int
-
1
- R → const String
-
Red value of a sample
'R'
- UINT → const int
-
0
- Z → const String
-
Distance of the front of a sample from the viewer
'Z'