ImageUtils class
author: zhengzaihong email:1096877329@qq.com date: 2024/8/14 time: 11:11 describe: 图片相关
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
compressByChunks(
Uint8List imageBytes, int targetSizeInBytes) → Uint8List? -
compressToDimension(
Uint8List imageBytes, int width, int height, {int quality = 90}) → Future< Uint8List?> - 压缩图片到指定宽高 Uint8List? fixedSizeBytes = await compressToDimension(originalBytes, 800, 600);
-
compressToSize(
Uint8List imageBytes, int targetSizeInBytes, {int minQuality = 20}) → Future< Uint8List?> - 压缩图片到指定大小 (单位:字节) 压缩到 200KB 以内 Uint8List? resizedBytes = await compressToSize(originalBytes, 200 * 1024);
-
getImageSize(
Uint8List imageBytes, {ImageSizeUnit unit = ImageSizeUnit.KB}) → String