canvas-color
Advanced tools
Comparing version 2.0.6 to 2.0.7
{ | ||
"name": "canvas-color", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "color", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -12,3 +12,2 @@ ;(function(root, factory) { | ||
'use strict'; | ||
var guid = function() { | ||
@@ -46,3 +45,2 @@ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | ||
var context = canvas.getContext('2d'); | ||
if (typeof this.image === 'string') { | ||
@@ -74,3 +72,4 @@ var img = new Image(); | ||
data.forEach(function(pixel, index) { | ||
Object.keys(data).forEach(function(index) { | ||
var pixel = data[index]; | ||
var colorIndex = index % 4; | ||
@@ -77,0 +76,0 @@ switch(colorIndex) { |
5089
124