All Projects → nhn → Toast Ui.vue Image Editor

nhn / Toast Ui.vue Image Editor

Licence: mit
Toast UI Image Editor for Vue

Projects that are alternatives of or similar to Toast Ui.vue Image Editor

Fixture
A no-bullshit, free and open source raster graphics editor.
Stars: ✭ 33 (-80.92%)
Mutual labels:  image-editor
Pesdk Android Demo
A fully customizable photo editor for your app.
Stars: ✭ 464 (+168.21%)
Mutual labels:  image-editor
Mopaint
🎨💪 Modern, modular paint and more! (pre-alpha, not much done yet)
Stars: ✭ 50 (-71.1%)
Mutual labels:  image-editor
Cascade
Node-based image editor with GPU-acceleration.
Stars: ✭ 122 (-29.48%)
Mutual labels:  image-editor
Tui.image Editor
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.
Stars: ✭ 4,761 (+2652.02%)
Mutual labels:  image-editor
Jspaint
🎨 Classic MS Paint, REVIVED + ✨Extras
Stars: ✭ 5,972 (+3352.02%)
Mutual labels:  image-editor
imgui
Dear ImGui Addons Branch = plain unmodified dear imgui plus some extra addon.
Stars: ✭ 348 (+101.16%)
Mutual labels:  image-editor
Zlimageeditor
A powerful image editor framework. Supports graffiti, cropping, mosaic, text stickers, image stickers, filters.
Stars: ✭ 148 (-14.45%)
Mutual labels:  image-editor
Fmphotopicker
A modern, simple and zero-dependency photo picker with an elegant and customizable image editor
Stars: ✭ 428 (+147.4%)
Mutual labels:  image-editor
Pyqx
Multiplatform graphics editor made with Python and PyQt and specializing in Pixel Art
Stars: ✭ 45 (-73.99%)
Mutual labels:  image-editor
Gimel-Studio
Old repo of the node-based image editor. See https://github.com/GimelStudio/GimelStudio for the next generation of Gimel Studio 🚀
Stars: ✭ 55 (-68.21%)
Mutual labels:  image-editor
Photodemon
A free portable photo editor focused on pro-grade features, high performance, and maximum usability.
Stars: ✭ 356 (+105.78%)
Mutual labels:  image-editor
Bbmetalimage
A high performance Swift library for GPU-accelerated image/video processing based on Metal.
Stars: ✭ 677 (+291.33%)
Mutual labels:  image-editor
fabricjs-image-editor-origin
fabric.js javascript image editor
Stars: ✭ 52 (-69.94%)
Mutual labels:  image-editor
Whatsapp Like Photoeditor
A library module that tries to mimic whatsapp photo editor.
Stars: ✭ 121 (-30.06%)
Mutual labels:  image-editor
cropper
Bildbearbeitung im REDAXO-Medienpool: Zuschneiden, Drehen, Spiegeln.
Stars: ✭ 33 (-80.92%)
Mutual labels:  image-editor
Zmjimageeditor
ZMJImageEditor is a picture editing component like WeChat. It is powerful and easy to integrate, supporting rendering, text, rotation, tailoring, mapping and other functions. (ZMJImageEditor 是一个和微信一样图片编辑的组件,功能强大,极易集成,支持绘制、文字、旋转、剪裁、贴图等功能)
Stars: ✭ 470 (+171.68%)
Mutual labels:  image-editor
Iquephoto
Android Image Editor Application.
Stars: ✭ 156 (-9.83%)
Mutual labels:  image-editor
Bbwebimage
A high performance Swift library for downloading, caching and editing web images asynchronously.
Stars: ✭ 128 (-26.01%)
Mutual labels:  image-editor
Pinta
Simple GTK# Paint Program
Stars: ✭ 802 (+363.58%)
Mutual labels:  image-editor

Vue wrapper for TOAST UI Image Editor

This is Vue component wrapping TOAST UI Image Editor.

vue2 github version npm version license PRs welcome code with hearth by NHN

🚩 Table of Contents

Collect statistics on the use of open source

TOAST UI ImageEditor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI ImageEditor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. > “ui.toast.com") is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the following usageStatistics option when creating the instance.

const options = {
    ...
    usageStatistics: false
}

const imageEditor = new tui.ImageEditor('#tui-image-editor-container', options);

Or, include tui-code-snippet(v1.4.0 or later) and then immediately write the options as follows:

tui.usageStatistics = false;

💾 Install

Using npm

npm install --save @toast-ui/vue-image-editor

If you install other packages, you may lose dependency on fabric. You need to reinstall the fabric.
npm install --no-save --no-optional [email protected]~1.6.7

🔡 Usage

Load

  • Using namespace

    const ImageEditor = toastui.ImageEditor;
    
  • Using module

    // es modules
    import {ImageEditor} from '@toast-ui/vue-image-editor';
    
    // commonjs require
    const {ImageEditor} = require('@toast-ui/vue-image-editor');
    
  • Using <script>

    If you just add javascript file to your html, you use toastui-vue-image-editor.js downloaded. Insert toastui-vue-image-editor.js with vue in your html like this:

    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="path/to/toastui-vue-image-editor.js"></script>
    
  • Using only Vue wrapper component (Single File Component)

    toastui-vue-image-editor.js has all of the tui.ImageEditor. If you only need vue wrapper component, you can use @toast-ui/vue-image-editor/src/ImageEditor.vue like this:

    import ImageEditor from '@toast-ui/vue-image-editor/src/ImageEditor.vue'
    

Implement

First insert <tui-image-editor> in the template or html. includeUi and options props are required.

<tui-image-editor :include-ui="useDefaultUI" :options="options"></tui-image-editor>

Load ImageEditor component and then add it to the components in your component or Vue instance.

import {ImageEditor} from '@toast-ui/vue-image-editor';

export default {
    components: {
        'tui-image-editor': ImageEditor
    },
    data() {
        return {
            useDefaultUI: true,
            options: { // for tui-image-editor component's "options" prop
                cssMaxWidth: 700,
                cssMaxHeight: 500
            }
        };
    }
}

Props

You can use includeUi and options props. Example of each props is in the Getting Started.

  • includeUi

    Type Required Default
    Boolean X true

    This prop can contained the includeUI prop in the option. You can see the default UI.

  • options

    Type Required Default
    Object X { cssMaxWidth: 700, cssMaxHeight: 500 }

    You can configurate your image editor using options prop. For more information which properties can be set in options, see options of tui.image-editor.

Event

  • addText: The event when 'TEXT' drawing mode is enabled and click non-object area.
  • mousedown: The mouse down event with position x, y on canvas
  • objectActivated: The event when object is selected(aka activated).
  • objectMoved: The event when object is moved.
  • objectScaled: The event when scale factor is changed.
  • redoStackChanged: Redo stack changed event
  • textEditing: The event which starts to edit text object.
  • undoStackChanged: Undo stack changed event
<tui-image-editor ...
                  @addText="onAddText"
                  @objectMoved="onObjectMoved">
</tui-image-editor>
...
methods: {
    onAddText(pos) {
        ...
    },
    onObjectMoved(props) {
        ...
    }
}
...

For more information such as the parameters of each event, see event of tui.image-editor.

Method

For use method, first you need to assign ref attribute of element like this:

<tui-image-editor ref="tuiImageEditor" :options="options"></tui-image-editor>

After then you can use methods through this.$refs. We provide getRootElement and invoke methods.

  • getRootElement

    You can get root element of image editor using this method.

    this.$refs.tuiImageEditor.getRootElement();
    
  • invoke

    If you want to more manipulate the ImageEditor, you can use invoke method to call the method of tui.ImageEditor. First argument of invoke is name of the method and second argument is parameters of the method. To find out what kind of methods are available, see method of tui.ImageEditor.

    const drawingMode = this.$refs.tuiImageEditor.invoke('getDrawingMode');
    
    this.$refs.tuiImageEditor.invoke('loadImageFromURL', './sampleImage.png', 'My sample image');
    
    this.$refs.tuiImageEditor.invoke('startDrawingMode', 'FREE_DRAWING', {
        width: 10,
        color: 'rgba(255, 0, 0, 0.5)'
    });
    

🔧 Pull Request Steps

TOAST UI products are open source, so you can create a pull request(PR) after you fix issues. Run npm scripts and develop yourself with the following process.

Setup

Fork develop branch into your personal repository. Clone it to local computer. Install node modules. Before starting development, you should check to haveany errors.

$ git clone https://github.com/{your-personal-repo}/[[repo name]].git
$ cd [[repo name]]
$ npm install

Develop

Let's start development!

Pull Request

Before PR, check to test lastly and then check any errors. If it has no error, commit and then push it!

For more information on PR's step, please see links of Contributing section.

📙 Documents

💬 Contributing

📜 License

This software is licensed under the MIT © NHN.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].