canvas-color
Advanced tools
Comparing version 2.0.7 to 2.0.8
{ | ||
"name": "canvas-color", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "color", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -12,2 +12,3 @@ ;(function(root, factory) { | ||
'use strict'; | ||
var guid = function() { | ||
@@ -21,2 +22,11 @@ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | ||
var getBase64 = function(img, width, height) { | ||
var canvas = document.createElement('canvas'); | ||
canvas.height = height; | ||
canvas.width = width; | ||
var ctx = canvas.getContext('2d'); | ||
ctx.drawImage(img, 0, 0); | ||
return canvas.toDataURL(); | ||
}; | ||
function CanvasColor(options) { | ||
@@ -30,11 +40,2 @@ this.image = options.image; | ||
function getBase64(img, width, height) { | ||
var canvas = document.createElement('canvas'); | ||
canvas.height = height; | ||
canvas.width = width; | ||
var ctx = canvas.getContext('2d'); | ||
ctx.drawImage(img, 0, 0); | ||
return canvas.toDataURL(); | ||
} | ||
CanvasColor.prototype.init = function() { | ||
@@ -41,0 +42,0 @@ var that = this; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5097