ImageDescriptor class Null safety

A descriptor of data that can be turned into an Image via a Codec.

Use this class to determine the height, width, and byte size of image data before decoding it.


ImageDescriptor.raw(ImmutableBuffer buffer, {required int width, required int height, int? rowBytes, required PixelFormat pixelFormat})
Creates an image descriptor from raw image pixels. [...]


bytesPerPixel int
The number of bytes per pixel in the image. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
height int
The height, in pixels, of the image. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
width int
The width, in pixels, of the image. [...]


dispose() → void
Release the resources used by this object. The object is no longer usable after this method is called.
instantiateCodec({int? targetWidth, int? targetHeight}) Future<Codec>
Creates a Codec object which is suitable for decoding the data in the buffer to an Image. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(Object other) bool
The equality operator. [...]

Static Methods

encoded(ImmutableBuffer buffer) Future<ImageDescriptor>
Creates an image descriptor from encoded data in a supported format.