Search categories, packages and repositories

GitHub repositoryboring-km/dynamic_image_crop

dynamic_image_crop

A Flutter Package that crops the image by drawing lines or cropping into various shapes

dynamic_image_crop project cover
Stars
3
Forks
2
Last push (UTC)
Sep 2, 2023
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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
}
Kangmin GitHub avatar
GitHub author

Kangmin ↗

열등감을 극복중인 사람

Woongjin Thinkbig Co.Republic of KoreaOfficial website ↗
LanguagesDartC++CMakeRubyHTMLSwiftCShellKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • very_good_analysisDevelopment—

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗