An image editor with crop, scribble, mosaic, add-text, flip, rotated functions.

Overview

image_editor_dove

A high-performance image editor with crop, scribble, mosaic, add-text, flip, rotated functions.

Support custom ui style.

  • drawing

draw.gif

  • rotate

flip&rotate.gif

  • mosaic

mosaic.gif

  • add or delete text

text_delete.gif

addtext_done.gif

Getting Started

First, add image_editor: as a dependency in your pubspec.yaml file.

import

import 'package:image_editor/flutter_image_editor.dart';

iOS Add the following keys to your Info.plist file, located in /ios/Runner/Info.plist:

  • NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
  • NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.
  • NSMicrophoneUsageDescription - describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor. Or in text format add the key:
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>

Android

No configuration required - the plugin should work out of the box.

Usage

pick an image that wanna edit, and pass it to image editor like this:

  Future<void> toImageEditor(File origin) async {
    return Navigator.push(context, MaterialPageRoute(builder: (context) {
      return ImageEditor(
        originImage: origin,
        //this is nullable, you can custom new file's save postion
        savePath: customDirectory
      );
    })).then((result) {
      if (result is EditorImageResult) {
        setState(() {
          _image = result.newFile;
        });
      }
    }).catchError((er) {
      debugPrint(er);
    });
  }

custom ui style

You can extends ImageEditorDelegate and custom editor's widget:

ImageEditor.uiDelegate = YouUiDelegate();

class YouUiDelegate extends ImageEditorDelegate{
    ...
}
Comments
  • IOS pods bug

    IOS pods bug

    https://github.com/bladeofgod/flutter_image_editor/blob/84c052b6e1a76e3bea1dc52e6abdd179aa169f6e/ios/Classes/ImageEditorPlugin.m#L2

    This line is not working. Try this code to compile: #if __has_include(<image_editor_dove/image_editor_dove-Swift.h>)

    opened by hesty 3
  • Custom painter size and mosaic size

    Custom painter size and mosaic size

    Hi, thank you for providing this amazing library.

    I imported this lib in my project, but I realized that I cannot customize the painter size of "Draw" and Mosaic size, could you help me please?

    opened by brandoneedyou 1
  • IOS Error

    IOS Error

    Error output from Xcode build: ↳ objc[88435]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x213ff3678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10833c2c8). One of the two will be used. Which one is undefined. objc[88435]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x213ff36c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10833c318). One of the two will be used. Which one is undefined. ** BUILD FAILED ** Xcode's output: ↳ Writing result bundle at path: /var/folders/q1/7mc8hw2532x8q_80f61ln3280000gn/T/flutter_tools.YWA6IZ/flutter_ios_build_temp_dirGHNr8H/temporary_xcresult_bundle /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler_apple-9.0.3/ios/Classes/strategies/PhonePermissionStrategy.m:50:35: warning: 'subscriberCellularProvider' is deprecated: first deprecated in iOS 12.0 [-Wdeprecated-declarations] CTCarrier *carrier = [netInfo subscriberCellularProvider]; ^~~~~~~~~~~~~~~~~~~~~~~~~~ serviceSubscriberCellularProviders In module 'CoreTelephony' imported from /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler_apple-9.0.3/ios/Classes/strategies/PhonePermissionStrategy.m:8: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h:112:50: note: property 'subscriberCellularProvider' is declared deprecated here @property(readonly, retain, nullable) CTCarrier *subscriberCellularProvider API_DEPRECATED_WITH_REPLACEMENT("serviceSubscriberCellularProviders", ios(4.0, 12.0)) API_UNAVAILABLE(macos); ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h:112:50: note: 'subscriberCellularProvider' has been explicitly marked deprecated here 1 warning generated. 1 warning generated. /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Scan/CameraScannerViewController.swift:14:50: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol CameraScannerViewOutputDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Protocols/CaptureDevice.swift:12:25: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead protocol CaptureDevice: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Scan/CameraScannerViewController.swift:14:50: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol CameraScannerViewOutputDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Protocols/CaptureDevice.swift:12:25: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead protocol CaptureDevice: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Edit/EditImageViewController.swift:13:40: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol EditImageViewDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Scan/CameraScannerViewController.swift:14:50: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol CameraScannerViewOutputDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Protocols/CaptureDevice.swift:12:25: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead protocol CaptureDevice: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Scan/CameraScannerViewController.swift:14:50: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol CameraScannerViewOutputDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Protocols/CaptureDevice.swift:12:25: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead protocol CaptureDevice: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Edit/EditImageViewController.swift:13:40: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol EditImageViewDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Scan/CameraScannerViewController.swift:14:50: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol CameraScannerViewOutputDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Protocols/CaptureDevice.swift:12:25: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead protocol CaptureDevice: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Scan/CameraScannerViewController.swift:14:50: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol CameraScannerViewOutputDelegate: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Protocols/CaptureDevice.swift:12:25: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead protocol CaptureDevice: class { ^~~~~ AnyObject /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/ios/Pods/WeScan/WeScan/Edit/EditImageViewController.swift:13:40: warning: using 'class' keyword to define a class-constrained protocol is deprecated; use 'AnyObject' instead public protocol EditImageViewDelegate: class { ^~~~~ AnyObject /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/git/flutter_image_editor-84c052b6e1a76e3bea1dc52e6abdd179aa169f6e/ios/Classes/ImageEditorPlugin.m:8:9: fatal error: 'image_editor_dove-Swift.h' file not found #import "image_editor_dove-Swift.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/git/flutter_image_editor-84c052b6e1a76e3bea1dc52e6abdd179aa169f6e/ios/Classes/ImageEditorPlugin.m:8:9: fatal error: 'image_editor_dove-Swift.h' file not found #import "image_editor_dove-Swift.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Error: Couldn't resolve the package 'image_editor_pro' in 'package:image_editor_pro/image_editor_pro.dart'. : Error: Not found: 'package:image_editor_pro/image_editor_pro.dart' import 'package:image_editor_pro/image_editor_pro.dart'; ^ Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aimage_editor_pro%2Fimage_editor_pro.dart; message=StandardFileSystem only supports file:* and data:* URIs) #0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7) #1 asFileUri (package:vm/kernel_front_end.dart:623:37) #2 writeDepfile (package:vm/kernel_front_end.dart:763:21) <asynchronous suspension> #3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:586:9) <asynchronous suspension> #4 starter (package:flutter_frontend_server/server.dart:85:12) <asynchronous suspension> #5 main (file:///opt/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24) <asynchronous suspension> Failed to package /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias. Command PhaseScriptExecution failed with a nonzero exit code ld: framework not found image_editor_dove clang: error: linker command failed with exit code 1 (use -v to see invocation) rsync: link_stat "/Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/build/ios/Debug-iphonesimulator/App.framework" failed: No such file or directory (2) rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/533514bb11/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9] rsync: link_stat "/Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/build/ios/Debug-iphonesimulator/App.framework" failed: No such file or directory (2) rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/533514bb11/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9] Unhandled exception: Exception: Command "rsync -av --delete --filter - .DS_Store /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/build/ios/Debug-iphonesimulator/App.framework /Users/mehmetkaranlik/Desktop/Repositories/Notititas/notitias/build/ios/Debug-iphonesimulator/Runner.app/Frameworks" exited with code 23 #0 Context.runSync #1 Context.embedFlutterFrameworks #2 Context.run #3 main #4 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32) #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12) Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order Result bundle written to path: /var/folders/q1/7mc8hw2532x8q_80f61ln3280000gn/T/flutter_tools.YWA6IZ/flutter_ios_build_temp_dirGHNr8H/temporary_xcresult_bundle Lexical or Preprocessor Issue (Xcode): 'image_editor_dove-Swift.h' file not found /opt/homebrew/Caskroom/flutter/2.8.0/flutter/.pub-cache/git/flutter_image_editor-84c052b6e1a76e3bea1dc52e6abdd179aa169f6e/ios/Classes/ImageEditorPlugin.m:7:8 Error (Xcode): Framework not found image_editor_dove Could not build the application for the simulator. Error launching application on iPhone 13 Pro. Exited (sigterm) No matter what i do i cant pass this error.

    opened by MehmetKaranlik 1
  • 给UP主和后来人一点建议吧

    给UP主和后来人一点建议吧

    图片编辑的库找了不少,要么做不到开箱即用,要么功能或实现太简单达不到要求。这个库做的还是很不错的,完成度很高,也比较符合我项目的需求。 当然,目前也有些小问题要解决。 1、ios编译错误依然存在。up主只改了一半,这行代码没改。 #if __has_include(<image_editor/image_editor-Swift.h>) 2、用截屏实现的保存图片方法失真比较严重,而且因为生成的图片大小改变了,导致同一张图片多次编辑,原始图片内容会越来越小。 我用RepaintBoundary包裹住RotatedBox区域输出图片的方式重新实现了,可以解决上面的问题。 3、垃圾桶区域并没有居中,而且生效的区域比较奇怪,我微调了一下。 代码已fork,有兴趣的兄弟可以去我那看看。 感谢up主的贡献。

    opened by souvhas 1
  • it default takes extra white space!

    it default takes extra white space!

    i have facing the issue while image is in Landscape it automatic taskes some extra white space on the Up side and at Down side also. may i know how to get over this. photo1657618604

    opened by jaygadariya 0
Owner
null
A Flutter image editor with support for paint, text, filters, emojis, stickers and more

Flutter Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.

null 44 Dec 22, 2022
Crop any widget/image in Android, iOS, Web and Desktop with fancy and customizable UI, in pure Dart code.

crop A Flutter package for cropping any widget, not only images. This package is entirely written in Dart and supports Android, iOS, Web and Desktop.

Mahdi 225 Jan 6, 2023
A simple and easy flutter demo to crop image

flutter_image_crop A simple demo to crop image on flutter easily. A Chinese version of this document can be found here Flutter_image_crop Plugin will

路小飞 3 Jul 8, 2021
A flutter plugin which provides Crop Widget for cropping images.

A flutter plugin which provides Crop Widget for cropping images. crop_your_image provides only minimum UI for deciding cropping area inside images. Other UI parts, such as "Crop" button or "Change Aspect Ratio" button, need to be prepared by each app developers.

Chooyan 96 Dec 31, 2022
A scrollable, dismissable by swiping, zoomable, rotatable image gallery on which you can add a dynamic overlay.

Swipe Image Gallery A scrollable, dismissable by swiping, zoomable, rotatable image gallery on which you can add a dynamic overlay. While it is intend

null 20 Dec 7, 2022
Flutter package for Image Carousel It is an image carousel widget.

Snapshot Carousel Flutter package for Image Carousel It is an image carousel widget. Supported platforms Flutter Android Flutter iOS Flutter web Flutt

Mrigank Anand 12 Jun 3, 2021
Generate & add your custom icons

The custom icons will be converted into a ttf font file, which will be added into the project. An automatically generated Dart file will be added, allowing icons to be used like Icon(CustomIcons.email)

Firgia 8 Nov 23, 2022
A Flutter widget that paints an image and moves it at a slower speed than the main scrolling content.

A Flutter widget that paints an image and moves it at a slower speed than the main scrolling content. Installation Add dependency to your pubspec.yaml

Anatoly Pulyaevskiy 272 Dec 23, 2022
📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.

Flutter Photo View A simple zoomable image/content widget for Flutter. PhotoView enables images to become able to zoom and pan with user gestures such

Fire Slime Games 1.7k Jan 3, 2023
Flutter plugin that allows you to display multi image picker on iOS and Android. 👌🔝🎉

IMPORTANT: This repository has been archived and no longer mantained. As I don't have time anymore to work on the package it became very outdated. For

Radoslav Vitanov 898 Apr 29, 2021
Image caching system for flutter

image_cacheing image_cacheing is an image caching package. It is currently tested for Android applications. ImageCacheing widget takes url as a param.

evolving_kid 3 May 31, 2021
A flutter tool to generate beautiful code snippets in the form of an image.

A flutter tool to generate beautiful code snippets in the form of an image.

Mahesh Jamdade 4 Jan 18, 2022
Simple and effective cross platform image saver for flutter, supported web and desktop

Simple and effective cross platform image saver for flutter, supported web and desktop

7c00 3 Oct 5, 2022
A simple Flutter Package to Mimic iMessage Image Picker for Flutter

A simple Flutter Package to Mimic iMessage Image Picker for Flutter

Paras Jain 64 Dec 26, 2022
A flutter package to convert any widget to an Image.

Davinci A package to convert any widget to an image which can be saved locally or can be shared to other apps and chats. ?? Preview ℹ️ Usage Prerequis

Sai Gokula Krishnan 37 Dec 20, 2022
Flutter Image Upload From Gallery

Image Upload From Gallery Image upload from gallery to Backend Dependencies image_picker: ^0.8.4+1 http: ^0.13.3 dio: ^4.0.0 Getting Started Image upl

Fatih Baycu 2 Oct 6, 2021
Multi image pixker using the image_picker package in flutter

multi_image_selection A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

Ambaliya Avnit Karshanbhai 1 Oct 13, 2021
flutter image demo 主要展示图片与动画处理的案例。比如:网络图片加载、图片预览、图片缩放、json动画处理等等。

flutter_image_demo flutter image demo 主要展示图片与动画处理的案例。 比如:网络图片加载、图片预览、图片缩放、json动画处理等等。 本项目使用到以下插件: cached_network_image、 photo_view 、 lottie 、 flutter_

null 2 Feb 27, 2022
Flutter Package to Pick Image From Gallery or Camera

image_picker_gallery_camera Flutter Package to Pick Image From Gallery or Camera Getting Started A Flutter plugin for iOS and Android for picking imag

Sayandh KP 8 Oct 5, 2022