Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function blobToFile(theBlob, fileName){
- theBlob.lastModifiedDate = new Date();
- theBlob.name = fileName;
- return theBlob;
- }
- export function removeExif(image) {
- return new Promise ((res, rej) => {
- loadImage(image, (img) => {
- if(img.type === "error") {
- return rej('error loading image');
- }
- img.toBlob(blob => {
- const file = blobToFile(blob, image.name);
- return res(file);
- })
- }, {
- canvas: true,
- orientation: true
- });
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement