Published
Edited
Jun 11, 2022
1 star
Insert cell
Insert cell
piexif = FileAttachment("piexifjs-1.0.6.js").url().then(require) // require('https://bundle.run/piexifjs@1.0.6')
Insert cell
Insert cell
Insert cell
exif = piexif.load(`data:image/jpeg;base64,${_arrayBufferToBase64(image)}`)
Insert cell
image = fetch(src).then(d => d.arrayBuffer())
Insert cell
function _arrayBufferToBase64( buffer ) {
var binary = '';
var bytes = new Uint8Array( buffer );
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode( bytes[ i ] );
}
return window.btoa( binary );
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more