Image class

Inheritance

Constructors

Image.file(String path, {StbiChannel desiredChannel = StbiChannel.default_, StbiDType dtype = StbiDType.u8})
factory
Image.fromBytes(Uint8List bytes, {StbiChannel desiredChannel = StbiChannel.default_, StbiDType dtype = StbiDType.u8})
factory
Image.fromPointer(Pointer<SizedNativeType> ptr, {required int width, required int height, required int channels, required StbiChannel desiredChannels, required StbiDType dtype, bool attach = true})

Properties

attach → bool
finalinherited
bytes → Uint8List
no setter
channels → int
no setter
desiredChannels → StbiChannel
no setter
dtype → StbiDType
final
elemCount → int
no setter
finalizer → NativeFinalizer
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
height → int
no setter
isEmpty → bool
no setterinherited
props → List<Object?>
no setteroverride
ptr → Pointer<Void>
Gets the pointer to the underlying C++ object
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → (int, int, int)
no setter
values → List<num>
no setter
width → int
no setter

Methods

clone() → Image
col(int x) → List<num>
dispose() → void
inherited
forEachPixel(void fn(int x, int y, List<num> pixel)) → void
normalize({List<double> mean = const [0.0, 0.0, 0.0, 0.0], List<double> std = const [1.0, 1.0, 1.0, 1.0], double scale = 1.0}) → Image
will clone data
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixel(int x, int y) → List<num>
reattach(Pointer<Void> ptr) → void
inherited
release() → void
Releases the underlying C++ object Subclasses must implement specific release logic
override
resize(int newWidth, int newHeight, {StbirPixelLayout pixelLayout = c.StbirPixelLayout.STBIR_RGB, StbirDataType dtype = c.StbirDataType.STBIR_TYPE_UINT8, StbirEdge edge = c.StbirEdge.STBIR_EDGE_CLAMP, StbirFilter filter = c.StbirFilter.STBIR_FILTER_DEFAULT, int? inputStride, int? outputStride}) → Image
row(int y) → List<num>
save(String path, {ImWriteFormats? format, Map<ImWriteFlags, int> params = const {}}) → int
toPlanar() → Image
Convert RGBRGBRGB to RRRGGGBBB, will copy data
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

info(String path) → (int, int, int, int)
infoBytes(Uint8List bytes) → (int, int, int, int)
is16Bit(String path) → bool
is16BitBytes(Uint8List bytes) → bool
isHDR(String path) → bool
isHDRBytes(Uint8List bytes) → bool