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

套件詳情v1.1.0

watermark_unique

watermark_unique 是一個 Flutter 套件,可在影像上加入文字與圖像水印。您可自訂水印的位置、顏色、背景色與內邊距。

AndroidiOSWeb
近 30 天下載
105
喜歡數
29
Pub 分數
150

安裝套件

flutter pub add watermark_unique

套件介紹

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

watermark_unique 是一個 Flutter 套件,專為在影像上加入可自訂的文字與圖像水印而設計。它允許使用者調整水印的位置、顏色、背景顏色與內邊距,以實現精確控制。適用於需要影像保護或品牌識別的應用程式,支援 Android、iOS 與 Web 平台。此套件輕量級,並能透過簡單指令順暢整合至現有的 Flutter 專案中。其開源性質鼓勵社群貢獻與透明度。

適用情境

  • 向圖像添加版權資訊
  • 用標誌為照片添加品牌標示
  • 保護數位內容免遭未經授權的使用
  • 創建帶水印的縮略圖
  • 視覺化自定義圖像元數據

主要特色

  • 支援文字和圖像水印
  • 可設定的位置與對齊方式
  • 可調節的顏色和背景選項
  • 可自定義的內邊距設定
  • 跨平台相容性(Android、iOS、Web)

適合對象

  • 攝影和媒體應用
  • 內容管理系統
  • 電商平台
  • 數位資產庫
  • 創意工具和編輯器

使用建議

  • 應用水印前需要先載入影像
  • 效能可能會隨著大圖像而變化
  • 僅限靜態水印放置
  • 無內建的復原或編輯歷史
  • 依賴外部圖像處理效率

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

watermark_unique

watermark_unique is a flutter package to add text and image watermarks on an image. You can customize the watermark's position, color, background color, and padding. Check on pub.dev: https://pub.dev/packages/watermark_unique

Documentation

Features
  • Add text to image
  • Add watermark to image
  • Get result via File or Uint8List

Parameters for image that you can change

  • Text
  • Position by X
  • Position by Y
  • Text size
  • Text color (withOpacity)
  • Background text color (optional / withOpacity)
  • Padding for text if background exist (optional)
  • Quality of image with watermark
  • Image format that you will use to compress

Usage

An example of how you can add text to an image (only IOS or Android):

final image = await watermarkPlugin.addTextWatermark(
  filePath: photo!.path, // image file path
  text: 'Test watermark text', // watermark text
  x: 500, // position by x
  y: 400, // position by y
  textSize: 250, // text size
  color: Colors.purpleAccent, // color of text
  isNeedRotateToPortrait: true, // rotation image to portrait (Default: false) ONLY ANDROID
  backgroundTextColor: Colors.black.withOpacity(0.5), // color of background text (optional)
  quality: 100, // quality of image with watermark
  backgroundTextPaddingLeft: 12, // padding of background text (optional)
  backgroundTextPaddingTop: 12, // padding of background text (optional)
  backgroundTextPaddingRight: 12, // padding of background text (optional)
  backgroundTextPaddingBottom: 12, // padding of background text (optional)
  imageFormat: ImageFormat.jpeg, // image format that you will use to compress
);

An example of how you can add a watermark to an image (only IOS or Android):

final image = await watermarkPlugin.addImageWatermark(
  filePath: photo!.path, // image file path
  watermarkImagePath: watermark!.path, // watermark image file path
  x: 500, // position by x
  y: 400, // position by x
  quality: 100, // quality of image with watermark
  imageFormat: ImageFormat.jpeg, // image format that you will use to compress
  watermarkWidth: 300, // watermark image width
  watermarkHeight: 300,  // watermark image height
);

An example of how you can add text to an image and get results via Uint8List (IOS || Android || WEB):

final image = await watermarkPlugin.addTextWatermarkUint8List(
  filePath: photo!.path, // image file path
  text: 'Test watermark text', // watermark text
  x: 500, // position by x
  y: 400, // position by y
  textSize: 250, // text size
  color: Colors.purpleAccent, // color of text
  isNeedRotateToPortrait: true, // rotation image to portrait (Default: false) ONLY ANDROID
  backgroundTextColor: Colors.black, // color of background text (optional)
  backgroundTextPaddingLeft: 12, // padding of background text (optional)
  backgroundTextPaddingTop: 12, // padding of background text (optional)
  backgroundTextPaddingRight: 12, // padding of background text (optional)
  backgroundTextPaddingBottom: 12, // padding of background text (optional)
);

An example of how you can add a watermark to an image and get results via Uint8List (IOS || Android || WEB):

final image = await watermarkPlugin.addImageWatermarkUint8List(
  filePath: photo!.path, // image file path
  watermarkImagePath: watermark!.path, // watermark image file path
  x: 500, // position by x
  y: 400, // position by x
  watermarkWidth: 300, // watermark image width
  watermarkHeight: 300,  // watermark image height
);

Example screenshots

所屬分類

依賴

依賴清單 2 項

  • image^4.5.4
  • plugin_platform_interface^2.1.8

原始碼儲存庫

使用此套件的專案

暫無相關資料。