MCPcopy Index your code
hub / github.com/TruthHun/BookStack / getImageSize

Function getImageSize

static/cropper/2.3.4/cropper.js:157–173  ·  view source on GitHub ↗
(image, callback)

Source from the content-addressed store, hash-verified

155 }
156
157 function getImageSize(image, callback) {
158 var newImage;
159
160 // Modern browsers (ignore Safari, #120 & #509)
161 if (image.naturalWidth && !IS_SAFARI_OR_UIWEBVIEW) {
162 return callback(image.naturalWidth, image.naturalHeight);
163 }
164
165 // IE8: Don't use `new Image()` here (#319)
166 newImage = document.createElement('img');
167
168 newImage.onload = function () {
169 callback(this.width, this.height);
170 };
171
172 newImage.src = image.src;
173 }
174
175 function getTransform(options) {
176 var transforms = [];

Callers 1

cropper.jsFile · 0.85

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected