• This repository has been archived on 18/Mar/2024
  • Stars
    star
    292
  • Rank 142,152 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Image comparison using node-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

More Repositories

1

background-removal-js

Remove backgrounds from images directly in the browser environment with ease and no additional costs or privacy concerns. Explore an interactive demo.
TypeScript
5,708
star
2

pesdk-ios-examples

A fully customizable photo editor for your app.
856
star
3

pesdk-android-demo

PhotoEditor SDK: A fully customizable photo editor for your app.
Java
623
star
4

imgly-sdk-html5

The most comprehensive photo editor SDK for web and mobile
574
star
5

pesdk-ios-build

PhotoEditor SDK: A fully customizable photo editor for your app.
Swift
152
star
6

vesdk-react-native

React Native module for VideoEditor SDK
TypeScript
144
star
7

vesdk-android-demo

VideoEditor SDK: A fully customizable video editor for your app.
Kotlin
144
star
8

pesdk-html5-build

PhotoEditor SDK: A fully customizable photo editor for your website.
JavaScript
131
star
9

pesdk-react-native

React Native module for PhotoEditor SDK
TypeScript
122
star
10

vesdk-ios-build

VideoEditor SDK: A fully customizable video editor for your app.
Swift
102
star
11

pesdk-react-native-demo

React Native example for PhotoEditor SDK
Java
76
star
12

cesdk-web-examples

Examples Repository for CreativeEditor SDK
CSS
70
star
13

adonis

Adonis ❤️ Aphrodite
JavaScript
43
star
14

video-editor-wasm-react

A Video editor with Wasm and React running entire in the browser, includes simple trimming control and a button to convert the video to a git.
JavaScript
33
star
15

pesdk-wrapper-vuejs

[Deprecated] Vue.js plugin for PhotoEditor SDK
JavaScript
27
star
16

pesdk-flutter

Flutter plugin for PhotoEditor SDK
Swift
27
star
17

ui-design-system-generator

Design & Develop System. Kickstart your sketch project with atomic styles, support for theming and unified naming.
JavaScript
22
star
18

vesdk-flutter

Flutter plugin for VideoEditor SDK
Swift
21
star
19

pesdk-blog-instagram-ui

Code accompanying the 'How to build Instagram's Story Editor in a Day' blog post
Java
19
star
20

vesdk-react-native-demo

React Native example for VideoEditor SDK
JavaScript
17
star
21

catalog-android

A fully customizable photo and video editor for your app.
Kotlin
14
star
22

cesdk-android-examples

Examples repository for running CreativeEngine on Android in Kotlin
Kotlin
14
star
23

IMGLYUI-swift

Fully customizable, simple-to-use design editor
Swift
13
star
24

pesdk-react-demo

[Deprecated] PhotoEditor SDK integration example for ReactJS
JavaScript
10
star
25

pesdk-ionic-demo

Ionic plugin demo for PhotoEditorSDK iOS and Android
TypeScript
9
star
26

imgly-flutter

Flutter plugin for IMG.LY SDK
Dart
9
star
27

catalog-ios

A fully customizable photo and video editor for your app.
Swift
9
star
28

vesdk-ios-examples

A fully customizable video editor for your app.
9
star
29

pesdk-cordova

Cordova & Ionic plugin for PhotoEditor SDK
TypeScript
8
star
30

catalog-react-native

A fully customizable photo and video editor for your app.
TypeScript
8
star
31

pesdk-cordova-demo

Cordova plugin demo for PhotoEditor SDK iOS & Android
Java
8
star
32

catalog-flutter

A fully customizable photo and video editor for your app.
Dart
7
star
33

IMGLYEngine-swift

Fully customizable, simple-to-use design editor
Swift
7
star
34

cesdk-swift-examples

Examples repository for running CE.SDK's CreativeEngine in Swift
Swift
7
star
35

pesdk-angular-demo

[Deprecated]
TypeScript
5
star
36

pesdk-server-build

A fully customizable photo editor for your app.
JavaScript
4
star
37

canva-clone-react-cesdk

This project is a Canva clone built with React and IMG.LY’s CE.SDK, providing a powerful and intuitive design editor for creating invitations, greeting cards, flyers, postcards, and business cards.
CSS
4
star
38

imgly-react-native

React Native base module for PhotoEditor and VideoEditor SDK
JavaScript
3
star
39

vesdk-cordova-demo

Cordova demo for VideoEditorSDK iOS and Android
Java
2
star
40

vesdk-ionic-demo

Ionic plugin demo for VideoEditorSDK iOS and Android
TypeScript
2
star
41

plugins

Plugins enhance the capabilities of CreativeEditor SDK (CE.SDK) by allowing developers to create and integrate custom plugins.
TypeScript
2
star
42

vesdk-cordova

Cordova & Ionic plugin for VideoEditor SDK
TypeScript
2
star
43

cesdk-node-examples

Examples repository for running CE.SDK's CreativeEngine in Node.js
JavaScript
2
star
44

tiktok-clone-ios-cesdk

A TikTok clone built with Swift and IMG.LY's CE.SDK mobile video editor and camera
Swift
2
star
45

pesdk-web-plugins

TypeScript
1
star
46

pesdk-rails-demo

[Deprecated] Ruby on Rails Demo for PhotoEditorSDK HTML5
Ruby
1
star
47

pesdk-web-examples

Examples Repository for PhotoEditor SDK
TypeScript
1
star
48

psd-importer

Import PSD files into the Creative Editor Ecosystem
TypeScript
1
star