Giter Club home page Giter Club logo

pdiffy's Introduction

#P Diffy ##A perceptual difference image tool.

alt text

##Running the web app

  1. Clone this repo
  2. Restore Nuget Packages
  3. Run this using Visual Studio (2013 or later) or host it somewhere (run it as an admin)
  4. (This step is required if you don't give P Diffy all the required permissions) Add the environment variables pdiffyImageStorePath and pdiffyDataStorePath and set the values to wherever you want to store the images and data P Diffy requires

##Using P Diffy

There are two ways to generate difference images using P Diffy.

  1. Host the images yourself. -- Endpoint: /api/page/update?name=nameofcomparison&imageUrl=yourimageurl
  • The first time you hit this endpoint with an image url P Diffy will create the base for future comparisons.
  • The second time you hit this endpoint with an image url P Diffy will compare the image at the given url with the image at the original url and generate a difference image if necessary.
  1. Let P Diffy host the images. -- Endppoint: /api/page/update?name=nameofcomparison

This endpoint requires the image that will be compared to be streamed to it. (see example below)

var request = HttpWebRequest.Create("//yourhosting.something/api/page/upload?name=nameofcomparison");
request.Method = "POST";
var stream = request.GetRequestStream();
var docFile = File.OpenRead(@"C:\Images\unicorn.png");
docFile.CopyTo(stream);
docFile.Close();
stream.Close();
var response = request.GetResponse();
  • The first time you hit this endpoint with a streamed image P Diffy will store the image and create the base for future comparisons.
  • The second time you hit this endpoint with streamed image P Diffy will save the newly streamed image and compare it to the orignal image, creating a difference image if necessary.

##Urls

pdiffy's People

Contributors

ryancosans avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.