FLUTTER ECOSYSTEM

crazecoder/flutter_luban

Ein Bildkomprimierungs-Paket wie Luban für Dart

Projektcover von flutter_luban
Stars
216
Forks
54
Letzter Push (UTC)
27.08.2026
Projektstatus
Aktiv
1/2 GitHub avatar
GITHUB User

1/2 ↗

Mars
SprachenDartObjective-C

Technische Themen

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 4 Einträge
  • flutter{"sdk":"flutter"}
  • image^4.9.2
  • cross_file^0.3.5+5
  • flutter_testEntwicklung{"sdk":"flutter"}

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Projekt-README ein-/ausklappen

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