FLUTTER ECOSYSTEM

boring-km/dynamic_image_crop

一個用於透過繪製線條或裁剪為各種形狀來裁剪影像的 Flutter 套件

dynamic_image_crop 專案封面
Stars
3
Forks
2
最近推送(UTC)
2023年9月2日
專案狀態
未封存
Kangmin GitHub avatar
GITHUB User

Kangmin ↗

열등감을 극복중인 사람

Woongjin Thinkbig Co.Republic of Korea官方網站 ↗
語言DartC++CMakeRubyHTMLSwiftCShellKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • very_good_analysis開發依賴

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

dynamic_image_crop

Pub https://codecov.io/gh/boring-km/dynamic_image_crop/branch/master/graph/badge.svg?token=c8fbc37f-5266-4bdb-8b09-ccb7ba5bf711 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
}