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

Function arrayBufferToDataURL

static/cropper/2.3.4/cropper.js:411–422  ·  view source on GitHub ↗
(arrayBuffer)

Source from the content-addressed store, hash-verified

409
410 // Only available for JPEG image
411 function arrayBufferToDataURL(arrayBuffer) {
412 var dataView = new Uint8Array(arrayBuffer);
413 var length = dataView.length;
414 var base64 = '';
415 var i;
416
417 for (i = 0; i < length; i++) {
418 base64 += fromCharCode(dataView[i]);
419 }
420
421 return 'data:image/jpeg;base64,' + btoa(base64);
422 }
423
424 function Cropper(element, options) {
425 this.$element = $(element);

Callers 1

cropper.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected