v2.1.2flutter_luban
一個類似於 Luban 的影像壓縮套件,基於 Dart 的 image。此程式庫沒有系統平台限制。
100喜歡 720近 30 天下載140Pub 分數
AndroidiOSmacOSWindowsLinux
一個類似於 Luban 的 Dart 圖片壓縮套件
{"sdk":"flutter"}^4.9.2^0.3.5+5{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
An image compress package like Luban for Dart, based on image.
If toRgb: true , it supports all readable image formats
CompressObject compressObject = CompressObject(
imageXFile: imageXFile, //image file
path: tempDir.path, //compress to path, default Directory.systemTemp.path
useCache: true, //If there is a cache, no compression will be performed
toRgb: true, //Convert the image to jpg
numberOfColors: 128, //the numberOfColors of image.quantize
);
Luban.compressImage(compressObject).then((xfile) {
setState(() {
print(xfile.path);
});
});
https://github.com/crazecoder/flutter_luban/blob/62bae66c5d067db82117038c6bb8bac2d54e14f9/screenshot/test.png?raw=true