ImageBytesResult class

Result of an in-memory image compression (see FlutterCompress.compressImageBytes). Mirrors ImageCompressResult but carries the encoded bytes instead of a path — nothing is written to disk.

Constructors

ImageBytesResult({required Uint8List bytes, required int originalSizeBytes, required int width, required int height, required String format, bool skipped = false})
const
ImageBytesResult.fromMap(Map m)
factory

Properties

bytes → Uint8List
The encoded image. When skipped is true these are the source bytes, returned unchanged.
final
compressedSizeBytes → int
no setter
compressionRatio → double
no setter
format → String
The format actually written ("jpeg"/"png"/"webp"/"heic") — may differ from the request when a platform lacks that encoder.
final
hashCode → int
The hash code for this object.
no setterinherited
height → int
final
originalSizeBytes → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
savedPercent → double
no setter
skipped → bool
True when re-encoding would not have helped, so the source was returned untouched (see ImageCompressConfig.keepOriginalIfLarger and ImageCompressConfig.minSavingsPercent).
final
width → int
final

Methods

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