搜索插件、代码仓与 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
}

所属分类

源码仓库

使用此插件的项目

暂无相关数据。