Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Released 0.1.1

  • Loading branch information...
commit 4046a827ab6ebb5fcd16114d5c757db6ace746dc 1 parent 6617459
@Munter authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  histogram.min.js
  2. +1 −1  package.json
View
2  histogram.min.js
@@ -1 +1 @@
-(function(){var e,t=function(t,n){var r=new e.Image;r.onerror=n,r.onload=function(){var t=(new e(r.width,r.height)).getContext("2d");t.drawImage(r,0,0),n(null,t.getImageData(0,0,r.width,r.height).data)},r.src=t},n=function(e,n){t(e,function(e,t){e&&n(e);var r={red:new Array(256),green:new Array(256),blue:new Array(256),alpha:new Array(256),colors:{rgb:0,rgba:0},palettes:{rgb:[],rgba:[]},greyscale:!0,alphachannel:!1},i,s,o,u,a={},f={},l;for(l=0;l<256;l+=1)r.red[l]=r.green[l]=r.blue[l]=r.alpha[l]=0;for(l=0;l<t.length;l+=4){i=t[l],s=t[l+1],o=t[l+2],u=t[l+3],u<255&&(r.alphachannel=!0);if(r.greyscale&&i!==s||i!==o)r.greyscale=!1;r.red[i]+=1,r.green[s]+=1,r.blue[o]+=1,r.alpha[u]+=1;var c=(i*16777216+s*65536+o*256+u).toString(16),h="#"+"0000000".substr(0,8-c.length)+c,p=h.substr(0,7);p in a?a[p]+=1:(a[p]=1,r.palettes.rgb.push(p),r.colors.rgb+=1),h in f?f[h]+=1:(f[h]=1,r.palettes.rgba.push(h),r.colors.rgba+=1)}n(null,r)})};typeof module!="undefined"?(e=require("canvas"),module.exports=n):(e=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},e.Image=Image,typeof define=="function"?define([],function(){return n}):window&&(window.histogram=n))})();
+(function(){var e,t=function(t,n){var r=new e.Image;r.onerror=n,r.onload=function(){var t=(new e(r.width,r.height)).getContext("2d");t.drawImage(r,0,0),n(null,t.getImageData(0,0,r.width,r.height).data)},r.src=t},n=function(e,n){t(e,function(e,t){if(e)return n(e);var r={red:new Array(256),green:new Array(256),blue:new Array(256),alpha:new Array(256),colors:{rgb:0,rgba:0},palettes:{rgb:[],rgba:[]},greyscale:!0,alphachannel:!1},i,s,o,u,a={},f={},l;for(l=0;l<256;l+=1)r.red[l]=r.green[l]=r.blue[l]=r.alpha[l]=0;for(l=0;l<t.length;l+=4){i=t[l],s=t[l+1],o=t[l+2],u=t[l+3],u<255&&(r.alphachannel=!0);if(r.greyscale&&i!==s||i!==o)r.greyscale=!1;r.red[i]+=1,r.green[s]+=1,r.blue[o]+=1,r.alpha[u]+=1;var c=(i*16777216+s*65536+o*256+u).toString(16),h="#"+"0000000".substr(0,8-c.length)+c,p=h.substr(0,7);p in a?a[p]+=1:(a[p]=1,r.palettes.rgb.push(p),r.colors.rgb+=1),h in f?f[h]+=1:(f[h]=1,r.palettes.rgba.push(h),r.colors.rgba+=1)}n(null,r)})};typeof module!="undefined"?(e=require("canvas"),module.exports=n):(e=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n},e.Image=Image,typeof define=="function"?define([],function(){return n}):window&&(window.histogram=n))})();
View
2  package.json
@@ -1,7 +1,7 @@
{
"author": "Peter Müller <munter@fumle.dk> (http://fumle.dk)",
"name": "histogram",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "Provides a histogram data structure of png, gif and jpeg images using canvas. This library works in the browser as well",
"keywords": [
"histogram",
Please sign in to comment.
Something went wrong with that request. Please try again.