ImageDescriptor class abstract

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.

Constructors

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

Properties

bytesPerPixel int
The number of bytes per pixel in the image.
no setter
hashCode int
The hash code for this object.
no setterinherited
height int
The height, in pixels, of the image.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
The width, in pixels, of the image.
no setter

Methods

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 nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

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