From e0879bc60015ab6be470b6828da0e50a7399bb9b Mon Sep 17 00:00:00 2001 From: Sem Date: Tue, 31 Jul 2012 09:28:14 +0200 Subject: Added some depenences. --- vendors/jquery-file-upload/js/vendor/load-image.min.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 vendors/jquery-file-upload/js/vendor/load-image.min.js (limited to 'vendors/jquery-file-upload/js/vendor/load-image.min.js') diff --git a/vendors/jquery-file-upload/js/vendor/load-image.min.js b/vendors/jquery-file-upload/js/vendor/load-image.min.js new file mode 100644 index 000000000..0f7ab3ffe --- /dev/null +++ b/vendors/jquery-file-upload/js/vendor/load-image.min.js @@ -0,0 +1 @@ +(function(a){"use strict";var b=function(a,c,d){var e=document.createElement("img"),f,g;return e.onerror=c,e.onload=function(){g&&(!d||!d.noRevoke)&&b.revokeObjectURL(g),c(b.scale(e,d))},window.Blob&&a instanceof Blob||window.File&&a instanceof File?f=g=b.createObjectURL(a):f=a,f?(e.src=f,e):b.readFile(a,function(a){e.src=a})},c=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;b.scale=function(a,b){b=b||{};var c=document.createElement("canvas"),d=a.width,e=a.height,f=Math.max((b.minWidth||d)/d,(b.minHeight||e)/e);return f>1&&(d=parseInt(d*f,10),e=parseInt(e*f,10)),f=Math.min((b.maxWidth||d)/d,(b.maxHeight||e)/e),f<1&&(d=parseInt(d*f,10),e=parseInt(e*f,10)),a.getContext||b.canvas&&c.getContext?(c.width=d,c.height=e,c.getContext("2d").drawImage(a,0,0,d,e),c):(a.width=d,a.height=e,a)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b){if(window.FileReader&&FileReader.prototype.readAsDataURL){var c=new FileReader;return c.onload=function(a){b(a.target.result)},c.readAsDataURL(a),c}return!1},typeof define!="undefined"&&define.amd?define(function(){return b}):a.loadImage=b})(this); \ No newline at end of file -- cgit v1.2.3