o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1366900019.119665: @value"V{I" class:ETI"ProcessedAsset;FI"logical_path;TI"+jquery-fileupload/vendor/load-image.js;FI" pathname;TI"’/Users/jfriesen/.rvm/gems/ruby-2.0.0-p0@curate/gems/jquery-fileupload-rails-0.4.1/vendor/assets/javascripts/jquery-fileupload/vendor/load-image.js;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-04-17T13:44:39-04:00;TI" length;TiJI" digest;TI"%73323372d7be1ffce4e061a16793883b;FI" source;TI"J/* * JavaScript Load Image 1.2.1 * https://github.com/blueimp/JavaScript-Load-Image * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /*jslint nomen: true */ /*global window, document, URL, webkitURL, Blob, File, FileReader, define */ (function ($) { 'use strict'; // Loads an image for a given File object. // Invokes the callback with an img or optional canvas // element (if supported by the browser) as parameter: var loadImage = function (file, callback, options) { var img = document.createElement('img'), url, oUrl; img.onerror = callback; img.onload = function () { if (oUrl && !(options && options.noRevoke)) { loadImage.revokeObjectURL(oUrl); } callback(loadImage.scale(img, options)); }; if ((window.Blob && file instanceof Blob) || // Files are also Blob instances, but some browsers // (Firefox 3.6) support the File API but not Blobs: (window.File && file instanceof File)) { url = oUrl = loadImage.createObjectURL(file); } else { url = file; } if (url) { img.src = url; return img; } return loadImage.readFile(file, function (url) { img.src = url; }); }, // The check for URL.revokeObjectURL fixes an issue with Opera 12, // which provides URL.createObjectURL but doesn't properly implement it: urlAPI = (window.createObjectURL && window) || (window.URL && URL.revokeObjectURL && URL) || (window.webkitURL && webkitURL); // Scales the given image (img or canvas HTML element) // using the given options. // Returns a canvas object if the browser supports canvas // and the canvas option is true or a canvas object is passed // as image, else the scaled image: loadImage.scale = function (img, options) { options = options || {}; var canvas = document.createElement('canvas'), width = img.width, height = img.height, scale = Math.max( (options.minWidth || width) / width, (options.minHeight || height) / height ); if (scale > 1) { width = parseInt(width * scale, 10); height = parseInt(height * scale, 10); } scale = Math.min( (options.maxWidth || width) / width, (options.maxHeight || height) / height ); if (scale < 1) { width = parseInt(width * scale, 10); height = parseInt(height * scale, 10); } if (img.getContext || (options.canvas && canvas.getContext)) { canvas.width = width; canvas.height = height; canvas.getContext('2d') .drawImage(img, 0, 0, width, height); return canvas; } img.width = width; img.height = height; return img; }; loadImage.createObjectURL = function (file) { return urlAPI ? urlAPI.createObjectURL(file) : false; }; loadImage.revokeObjectURL = function (url) { return urlAPI ? urlAPI.revokeObjectURL(url) : false; }; // Loads a given File object via FileReader interface, // invokes the callback with a data url: loadImage.readFile = function (file, callback) { if (window.FileReader && FileReader.prototype.readAsDataURL) { var fileReader = new FileReader(); fileReader.onload = function (e) { callback(e.target.result); }; fileReader.readAsDataURL(file); return fileReader; } return false; }; if (typeof define === 'function' && define.amd) { define(function () { return loadImage; }); } else { $.loadImage = loadImage; } }(this)); ;TI"dependency_digest;TI"%d461b3ce06077b29593823e0a28fab1a;FI"required_paths;T[I"’/Users/jfriesen/.rvm/gems/ruby-2.0.0-p0@curate/gems/jquery-fileupload-rails-0.4.1/vendor/assets/javascripts/jquery-fileupload/vendor/load-image.js;FI"dependency_paths;T[{I" path;TI"’/Users/jfriesen/.rvm/gems/ruby-2.0.0-p0@curate/gems/jquery-fileupload-rails-0.4.1/vendor/assets/javascripts/jquery-fileupload/vendor/load-image.js;FI" mtime;TI"2013-04-17T13:44:39-04:00;TI" digest;TI"%58a8e4cf1d1210575c34bbd482829283;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F