UGrayImage class
An 8-bit grayscale view over a frame or image, with cheap crop/rotate/scale.
Constructors
Properties
- data → Uint8List
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → int
-
final
- isEmpty → bool
-
no setter
- left → int
-
Offset of this view inside the original frame, used to map results back.
final
- rowStride → int
-
Distance in bytes between the start of two rows. Zero means width.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceHeight → int
-
final
- sourceWidth → int
-
final
- stride → int
-
no setter
- top → int
-
final
- width → int
-
final
Methods
-
at(
int x, int y) → int -
crop(
int x, int y, int w, int h) → UGrayImage -
downscale(
int factor) → UGrayImage -
Nearest-neighbour downscale by an integer
factor; 1 returns this. -
inverted(
) → UGrayImage -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotate180(
) → UGrayImage -
rotate270(
) → UGrayImage -
rotate90(
) → UGrayImage -
row(
int y, [Uint8List? into]) → Uint8List -
Copies one row into
into(allocated when null). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromLuminance(
Uint8List plane, int width, int height, {int rowStride = 0}) → UGrayImage - Wraps the Y plane of a YUV420/NV21 frame without copying when possible.
-
fromPacked(
Uint8List pixels, int width, int height, {bool bgra = true, int rowStride = 0}) → UGrayImage - Builds a grayscale image from packed 32-bit pixels.