All Projects β†’ nitin42 β†’ React Tint

nitin42 / React Tint

A React component that applies image processing filters to an image using Processing

Programming Languages

javascript
184084 projects - #8 most used programming language
processing
702 projects

Projects that are alternatives of or similar to React Tint

Hilo
A Cross-end HTML5 Game development solution developed by Alibaba Group
Stars: ✭ 5,723 (+6330.34%)
Mutual labels:  webgl, canvas
Wxinlineplayer
🀟Super fast H.264/H.265 FLV player
Stars: ✭ 873 (+880.9%)
Mutual labels:  webgl, canvas
Exokit
Native VR/AR/XR engine for JavaScript πŸ¦–
Stars: ✭ 809 (+808.99%)
Mutual labels:  webgl, canvas
Awesome Pixijs
My list of awesome pixi.js related parties
Stars: ✭ 489 (+449.44%)
Mutual labels:  webgl, canvas
Glslcanvas
Simple tool to load GLSL shaders on HTML Canvas using WebGL
Stars: ✭ 1,067 (+1098.88%)
Mutual labels:  webgl, canvas
People You Should Follow On Codepen
People You Should Follow on CodePen
Stars: ✭ 542 (+508.99%)
Mutual labels:  webgl, canvas
Postprocessing
A post processing library that provides the means to implement image filter effects for three.js.
Stars: ✭ 830 (+832.58%)
Mutual labels:  webgl, image-processing
Indoor3d
a js lib based on three.js to show 3D indoor map
Stars: ✭ 425 (+377.53%)
Mutual labels:  webgl, canvas
Curtainsjs
curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.
Stars: ✭ 1,039 (+1067.42%)
Mutual labels:  webgl, canvas
Pixi.js
The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
Stars: ✭ 34,982 (+39205.62%)
Mutual labels:  webgl, canvas
Spritejs
A cross platform high-performance graphics system.
Stars: ✭ 4,712 (+5194.38%)
Mutual labels:  webgl, canvas
React Ape
πŸ¦β€’ [Work in Progress] React Renderer to build UI interfaces using canvas/WebGL
Stars: ✭ 1,183 (+1229.21%)
Mutual labels:  webgl, canvas
Gaussianblur
An easy and fast library to apply gaussian blur filter on any images. 🎩
Stars: ✭ 473 (+431.46%)
Mutual labels:  image-processing, canvas
React Force Graph
React component for 2D, 3D, VR and AR force directed graphs
Stars: ✭ 589 (+561.8%)
Mutual labels:  webgl, canvas
Lena.js
πŸ‘© Library for image processing
Stars: ✭ 432 (+385.39%)
Mutual labels:  image-processing, canvas
Vintagejs
Add a retro/vintage effect to images using the HTML5 canvas element
Stars: ✭ 826 (+828.09%)
Mutual labels:  image-processing, canvas
Beam
✨ Expressive WebGL
Stars: ✭ 383 (+330.34%)
Mutual labels:  webgl, image-processing
Duckhunt Js
DuckHunt ported to JS and HTML5
Stars: ✭ 390 (+338.2%)
Mutual labels:  webgl, canvas
Phaser
Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
Stars: ✭ 30,918 (+34639.33%)
Mutual labels:  webgl, canvas
Deep Viz
A React component library, providing concise and beautiful diversity charts with Canvas, SVG, E-map, WebGL, Dom, based on data visualization experience and commercial data display practice.
Stars: ✭ 55 (-38.2%)
Mutual labels:  webgl, canvas

react-tint

size-label

A React component that applies image processing filters to an image using Processing

Install

yarn add react-tint

This package also depends on React, so make sure you've already installed it.

Usage

react-tint exposes only a single component, <ImageTint />, that takes different props as filters and an image, and applies them and returns a new canvas.

import React, { Component } from 'react'
import ImageTint from 'react-tint'

class App extends Component {
  render() {
    return (
      <ImageTint
        canvas={{ height: 500, width: 500, renderer: 'P2D' }}
        tint="blue"
        src="Sunflower.jpg"
        style={{ margin: 'auto', width: '50%', padding: '20px' }}
      />
    )
  }
}

API

ImageTint

A component that applies image processing filters using Processing.

Props

  • canvas

canvas prop takes an object with three properties - height, width and a renderer type.

Example -

<ImageTint canvas={{ width: 200, height: 200, renderer: 'WEBGL'}} />

Two types of renderers are supported, WEBGL and P2D.

The P2D renderer uses OpenGL for faster rendering of two-dimensional graphics but at the expense of speed.

  • tint

tint takes different types of data for an image. It can take a simple string of color name, array of values that includes Red, Green, Blue and alpha value for image transparency and an object that describes color and alpha channel.

Example -

Color name

<ImageTint tint="red" />

Array of values

<ImageTint tint={[100, 120, 100, 65]} />

This array corresponds to => [RED, GREEN, BLUE, ALPHA]

Object describing color and alpha value

<ImageTint tint={{ color: 255, alpha: 30 }}

The above code retains the original color of an image and applies transparency with value 30.

So its up to you how declare the values using the tint prop.

  • src

src prop takes an image path

Example -

<ImageTint src="path/to/image"

License

MIT

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].