搜尋套件、儲存庫與 APP 分類

套件詳情v0.0.9

dynamic_image_crop

一個 Flutter 套件,可透過繪製線條或裁剪成各種形狀來裁剪影像。

AndroidiOSmacOSWindowsLinux
近 30 天下載
77
喜歡數
30
Pub 分數
150

安裝套件

flutter pub add dynamic_image_crop

套件介紹

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

動態影像裁切是一個Flutter套件,允許使用者透過繪製自訂線條或選擇各種形狀來裁切影像。它提供一個互動式介面,實現精確的影像裁切,並支援即時動態調整。適用於需要靈活影像編輯的應用程式,可在Android、iOS、macOS、Windows及Linux等多個平台運作。此套件專為尋求直覺且可客製化裁切功能、無需複雜設定的開發者設計。

適用情境

  • 互動式圖像編輯
  • 自定形狀裁剪
  • 即時作物調整
  • 照片編輯應用
  • 使用者產生內容工具
  • 社交媒體圖像處理

主要特色

  • 繪製自定義裁剪邊界
  • 支援多種形狀
  • 即時預覽
  • 跨平台相容性
  • 與 Flutter 的簡單整合
  • 可設定的作物限制

適合對象

  • 開發照片編輯器的開發者
  • 需要使用者定義影像裁切的應用程式
  • 具有視覺編輯的創意工具
  • 行動和桌面圖像處理應用
  • 教育或設計導向的應用程式

使用建議

  • 需要使用者輸入以定義裁切區域
  • 可能影響大圖像的效能
  • 僅限基本裁剪邏輯
  • 無內建影像濾鏡或增強功能
  • 依賴於準確的觸控/拖曳手勢
  • 未針對批次處理進行優化

原始 README

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

dynamic_image_crop

Pub Flutter Demo License: MIT


A Flutter package to crop images into various shapes.

Introduction

demo

You can test the package by this link: demo_link

Features

dynamic_image_crop supports the following features:

  • Crop an image into user drawing shapes.
  • Crop an image into rectangle, circle, triangle shapes.
  • Change the color of the crop shape line.
  • Change the width of the crop shape line.

Usage

import 'package:dynamic_image_crop/dynamic_image_crop.dart';

final controller = CropController();

DynamicImageCrop(
  controller: controller,
  image: image!,  // Uint8List
  onResult: (image, width, height) {
    // cropped Image (Uint8List), width and height
  },
  cropLineColor: Colors.red, // (Optional)
  cropLineWidth: 1.0, // (Optional)
)

DynamicImageCrop.fromFile(
  imageFile: file,  // File
  controller: controller,
  onResult: (image, width, height) {
    // cropped Image (Uint8List), width and height
  },
)

CropController has the following methods:

void cropImage() {}
void changeType(CropType type) {}
void changeImage(Uint8List image) {}
void clearCropArea() {}

CropType has the following types:

enum CropType {
  rectangle, circle, triangle, drawing, none
}

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。