搜尋分類、套件與程式碼儲存庫

flutter_luban 封面
套件詳情v2.1.2

flutter_luban

一個類似於 Luban 的影像壓縮套件,基於 Dart 的 image。此程式庫沒有系統平台限制。

AndroidiOSmacOSWindowsLinux
近 30 天下載
785
喜歡數
101
Pub 分數
130

安裝套件

flutter pub add flutter_luban

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

flutter_luban 是一個基於 Dart 的影像壓縮套件,靈感來自 Luban,旨在減少影像檔案大小而不顯著損失品質。它獨立於底層平台運作,相容於 Android、iOS、macOS、Windows 和 Linux。該程式庫利用高效能的影像處理演算法,提供適合 Web 和行動應用程式的最佳化輸出。非常適合需要在上傳或儲存期間快速且可靠地優化影像的應用程式。

適用情境

  • 上傳前的圖像優化
  • 減少應用程式儲存空間使用
  • 提升媒體載入效能
  • 準備圖片以供網路傳輸
  • 工作流程中的自動化影像壓縮

主要特色

  • 跨平台相容性
  • 高壓縮效率
  • 最小質量下降
  • 無原生平台依賴
  • 透過 Flutter pub 簡單整合

適合對象

  • 需要圖像壓縮的移動和桌面應用程式
  • 注重效能和大小的開發者
  • 處理大量用戶上傳圖片的應用程式
  • 跨平台需要一致壓縮的項目
  • 帶有多媒體內容的Flutter應用

使用建議

  • 可能需要測試邊緣情況的圖像格式
  • 壓縮比根據輸入圖像而變化
  • 不適用於無損壓縮需求
  • 與高階影像庫相比,自訂選項較少
  • 取決於底層圖像處理的準確性

原始 README

以下為關聯原始碼儲存庫的 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);
        });
    });

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。