1.0.9 • Published 3 years ago

canvas-image-pixel v1.0.9

Weekly downloads
4
License
ISC
Repository
github
Last release
3 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

3 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago