big updat:
- update dependencies - add webp support and webp conversion for profile images
This commit is contained in:
parent
19c3dbb42d
commit
95aaaa69ea
244 changed files with 121382 additions and 86 deletions
11
webroot/webp-worker.js
Normal file
11
webroot/webp-worker.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { encodeAnimation } from './wasm-webp/index.js';
|
||||
|
||||
self.onmessage = async (e) => {
|
||||
let { targetWidth, targetHeight, webpFrames } = e.data;
|
||||
try {
|
||||
let webpUint8 = await encodeAnimation(targetWidth, targetHeight, true, webpFrames);
|
||||
self.postMessage({ success: true, data: webpUint8 }, [webpUint8.buffer]);
|
||||
} catch (err) {
|
||||
self.postMessage({ success: false, error: err.toString() });
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue