2.0.0 • Published 4 years ago

embellish-image v2.0.0

Weekly downloads
16
License
MIT
Repository
github
Last release
4 years ago

embellish-image

v2.0.0 👏👏👏 A plugin that can upload local image, crop image, embellish image and export image to server or local.

Usage

import { EmbellishImage, getImageURL } from 'embellish-image';
const option = {};

const embellish = new EmbellishImage(document.getElementById('canvas'), option);

// renderImage
const inputImage = document.getElementById('image');
inputImage.addEventListener('change', (ev) => {
  const src = getImageURL(ev);
  embellish.renderImage(src);
});
embellish.getImageData();
embellish.putImageData(imageData: ImageData);

const value = 2;

embellish.grayscale(true);
embellish.invert(true);
embellish.brightness(value);
embellish.contrast(value);

// reset all changes
embellish.reset();

embellish.exportImage(callback, type?:string, quality?:any);
embellish.exportConfig();

Features

  • render image
  • drag
  • zoom
  • invert
  • grayscale
  • brightness
  • contrast
  • export image to blob
  • export config
  • Initialize with config

Development

git clone git@github.com:TaylorPzreal/embellish-image.git
cd embellish-image

yarn install

For test

yarn start
yarn server

# open url
http://127.0.0.1:9000/demos/

For prod

yarn build
2.0.0

4 years ago

2.0.0-beta.0

7 years ago

1.2.0-beta.3

7 years ago

1.2.0-beta.2

7 years ago

1.2.0-beta.1

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago