(function(root, factory) {
'use strict';
/* istanbul ignore else */
if (typeof exports === 'object') {
// CommonJS
module.exports = factory();
} else if (typeof define === 'function' && define.amd) {
// AMD
define(function() {
return factory();
});
} else if (typeof define === 'function' && define.cmd) {
// CMD
define(function(require, exports, module) {
module.exports = factory();
});
} else {
// Global Variables
root.ResizeImage = factory();
}
})(this, function () {
'use strict';
var out = {};
var IMG_TYPE_PNG = 'png';
var IMG_TYPE = [IMG_TYPE_PNG, 'gif', 'bmp', 'jpeg', 'webp'];
for (var i = 0; i < IMG_TYPE.length; i++) {
out[IMG_TYPE[i].toUpperCase()] = IMG_TYPE[i];
}
/**
* 计算新图片宽高
* @private
* @param {Image} img an
or Image() or