1.0.9 • Published 4 years ago

canvas-image-pixel v1.0.9

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

Installation

The easiest way to install custom-canvas-api is with npm.

npm install canvas-image-pixel

example

demo

Components

Currently, it only includes several methods: reflection, reverse, blur, curtain, gray and mosaic. And all these methods can be combined by compose function.

Usage

import { compose, reflectionLeftRight, reflectionUpDown, blueColor } from 'canvas-image-pixel';

const canvas = document.getElementById("canvas");
const cxt = canvas.getContext("2d");
const img = document.getElementById("img");
cxt.drawImage(img, 0, 0, 960, 442);
const imgData = cxt.getImageData(0, 0, 960, 442);
cxt.putImageData(compose(reflectionLeftRight, reflectionUpDown, blueColor)(imgData), 970, 452);
1.0.9

4 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago