M
M
mirikkingg2022-04-18 00:56:19
JavaScript
mirikkingg, 2022-04-18 00:56:19

How to get an image from metadata?

Got exif pictures, how to get the picture itself??

cff5b110aa264ba6876b08579552682f.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mirikkingg, 2022-04-20
@mirikkingg

let{ data } = exif
let base64String = "";
for (const i = 0; i < data.length; i++) {
base64String += String.fromCharCode(data[i]);
}
img.src = `data:${data.format};base64,${window.btoa(base64String)}`;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question