All Projects → imgly → Rembrandt

imgly / Rembrandt

Licence: mit
Image comparison using node-canvas

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Rembrandt

Json2canvas
通过json直接在canvas上绘制图像,支持小程序和浏览器.
Stars: ✭ 189 (-12.5%)
Mutual labels:  canvas
Aimandshoot
A neuroevolution game experiment.
Stars: ✭ 201 (-6.94%)
Mutual labels:  canvas
Canvas2dtowebgl
Ports (almost) all Canvas2D functions to the GPU so it can be mixed with a WebGL canvas.
Stars: ✭ 206 (-4.63%)
Mutual labels:  canvas
Apple Pencil Safari Api Test
Canvas sketch board, force touch, real-time Bezier curve.
Stars: ✭ 189 (-12.5%)
Mutual labels:  canvas
Jest Canvas Mock
🌗 A module used to mock canvas in Jest.
Stars: ✭ 189 (-12.5%)
Mutual labels:  canvas
Demos
One repo to rule them all.
Stars: ✭ 204 (-5.56%)
Mutual labels:  canvas
Romantic Words
一个表白用的页面
Stars: ✭ 184 (-14.81%)
Mutual labels:  canvas
Flvplayer
🍭 FlvPlayer.js is a JavaScript player for decode flv to the canvas
Stars: ✭ 210 (-2.78%)
Mutual labels:  canvas
Gown.js
UI system for pixi.js inspired by feathers-ui
Stars: ✭ 195 (-9.72%)
Mutual labels:  canvas
One Html Page Challenge
Can you create something cool without modern tools?
Stars: ✭ 205 (-5.09%)
Mutual labels:  canvas
Kiddopaint
Kiddo Paint
Stars: ✭ 189 (-12.5%)
Mutual labels:  canvas
Lottie Miniapp
lottie mniapp 小程序
Stars: ✭ 191 (-11.57%)
Mutual labels:  canvas
Picasso
Picasso is a high quality 2D vector graphic rendering library. It support path , matrix , gradient , pattern , image and truetype font.
Stars: ✭ 205 (-5.09%)
Mutual labels:  canvas
Ribbon.js
🎀 Only 1kb javascript gist to generate a ribbon in your website with HTML5 canvas.
Stars: ✭ 189 (-12.5%)
Mutual labels:  canvas
Wxa Comp Canvas Drag
小程序组件-canvas拖拽组件
Stars: ✭ 208 (-3.7%)
Mutual labels:  canvas
Online Privacy Test Resource List
Privacy Online Test and Resource Compendium (POTARC) 🕵🏻
Stars: ✭ 185 (-14.35%)
Mutual labels:  canvas
Pencil.js
✏️ Nice modular interactive 2D drawing library
Stars: ✭ 204 (-5.56%)
Mutual labels:  canvas
Easy Canvas
使用render函数在canvas中创建文档流布局,小程序海报图、小程序朋友圈分享图。easy-canvas is a powerful tool helps us easy to layout with canvas.
Stars: ✭ 216 (+0%)
Mutual labels:  canvas
Whitebird
Open-Source, collaborative, digital Whiteboard
Stars: ✭ 209 (-3.24%)
Mutual labels:  canvas
React Financial Charts
Charts dedicated to finance.
Stars: ✭ 201 (-6.94%)
Mutual labels:  canvas

TravisCI Status Slack Status

Rembrandt.JS - Client- and server-side image comparison library

Rembrandt

Rembrandt.JS is a image comparison library that works both with the HTML5 Canvas2D API as well as the drop-in Node.JS replacement node-canvas.

We created Rembrandt.JS to have an easy-to-use image comparison library for our internal tests for PhotoEditorSDK. Go check it out. It's really awesome. :)

Installation

Node.JS

Please follow the installation instructions over at node-canvas in order to correctly install all required system libraries. Afterwards, just run:

npm install rembrandt

Browser

Download the latest build from our Releases page, then include it like this:

<script src="/path/to/rembrandt.min.js"></script>

The Rembrandt JavaScript variable is now globally available.

Using module bundlers like Webpack etc.

Install Rembrandt via npm install rembrandt, then require it inside your JavaScript like so:

var Rembrandt = require('rembrandt/build/browser')

Usage

Here is an example (ES6 / ES2015):

import Rembrandt from 'rembrandt'

const rembrandt = new Rembrandt({
  // `imageA` and `imageB` can be either Strings (file path on node.js,
  // public url on Browsers) or Buffers
  imageA: '/path/to/imageA',
  imageB: fs.readFileSync('/path/to/imageB'),

  // Needs to be one of Rembrandt.THRESHOLD_PERCENT or Rembrandt.THRESHOLD_PIXELS
  thresholdType: Rembrandt.THRESHOLD_PERCENT,

  // The maximum threshold (0...1 for THRESHOLD_PERCENT, pixel count for THRESHOLD_PIXELS
  maxThreshold: 0.01,

  // Maximum color delta (0...1):
  maxDelta: 0.02,

  // Maximum surrounding pixel offset
  maxOffset: 0,

  renderComposition: true, // Should Rembrandt render a composition image?
  compositionMaskColor: Rembrandt.Color.RED // Color of unmatched pixels
})

// Run the comparison
rembrandt.compare()
  .then(function (result) {
    console.log('Passed:', result.passed)
    console.log('Pixel Difference:', result.differences, 'Percentage Difference', result.percentageDifference, '%')
    console.log('Composition image buffer:', result.compositionImage)

    // Note that `compositionImage` is an Image when Rembrandt.js is run in the browser environment
  })
  .catch((e) => {
    console.error(e)
  })

License

See LICENSE.md

Authors and Contributors

Copyright (c) 2016 by PhotoEditorSDK.com

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