forked from olcxjas-softworks/LarpixClient
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
node_modules/super-image-cropper/esm/utils/index.js
generated
vendored
Normal file
11
node_modules/super-image-cropper/esm/utils/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export const renderImageData2Canvas = (imageData) => {
|
||||
const tempCanvas = document.createElement('canvas');
|
||||
const tempCtx = tempCanvas.getContext('2d');
|
||||
const targetCanvas = document.createElement('canvas');
|
||||
const targetCtx = targetCanvas.getContext('2d');
|
||||
document.body.appendChild(targetCanvas);
|
||||
tempCanvas.width = imageData.width;
|
||||
tempCanvas.height = imageData.height;
|
||||
tempCtx?.putImageData(imageData, 0, 0);
|
||||
targetCtx?.drawImage(tempCanvas, 0, 0);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue