resim
v0.0.7-alpha
Published
Fast image manipulation library for JavaScript world
Downloads
2
Readme
Resim - Image Manipulation written in Rust for Javascript world
Resim is an npm package that allows you to perform various image manipulations on your images using Rust, a fast and efficient programming language. Currently, Resim supports converting png images to grayscale, and it aims to expand its feature set in the future.
Disclaimer: Resim is still at a very early phase of development, so don't use it for production.
P.S.: Resim means 'image' in Turkish
Features
- Convert images to grayscale (function name:
convertToGrayscale
) - Convert images to have inverted colors (function name:
invertColors
) - Convert images to have blurry effect (function name:
blurImage
)
Installation
You can install Resim using npm:
npm install resim
Usage
import * as resim from "resim";
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.drawImage(document.getElementById('image'), 0, 0);
const imageResim = resim.convertToGrayscale(canvas, ctx)
resim.placeImage(canvas, ctx, imageResim);
Example
Take a look at sample implementation here