namespace cleanup for workers

This commit is contained in:
Stewart Allen 2020-06-16 11:08:50 -04:00
commit 4cae0b945a
4 changed files with 35 additions and 23 deletions

View file

@ -78,9 +78,10 @@
});
}
let b64 = atob(currentSnap);
let b64 = atob(self.worker.snap);
let bin = Uint8Array.from(b64, c => c.charCodeAt(0));
let img = new png.PNG().parse(bin, (err, data) => {
let img = new png.PNG();
img.parse(bin, (err, data) => {
preview = img;
previewSmall = samplePNG(img, 200, 125);
previewLarge = samplePNG(img, 400, 300);