FLUTTER ECOSYSTEM

crazecoder/flutter_luban

Dart用のLubanのような画像圧縮パッケージ

flutter_luban のプロジェクト画像
Stars
216
Forks
54
最終プッシュ(UTC)
2026/08/27
プロジェクト状態
公開中
1/2 GitHub avatar
GITHUB User

1/2 ↗

Mars
言語DartObjective-C

技術トピック

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 4 件
  • flutter{"sdk":"flutter"}
  • image^4.9.2
  • cross_file^0.3.5+5
  • flutter_test開発用{"sdk":"flutter"}

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

flutter_luban

pub package

An image compress package like Luban for Dart, based on image.

If toRgb: true , it supports all readable image formats

Readable Format

Example
   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