mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-30 06:15:55 +02:00
create smaller base64 image in UI
This commit is contained in:
parent
79eec2e751
commit
4d5c7133bc
@ -831,14 +831,8 @@
|
||||
let canvas = document.createElement('canvas')
|
||||
canvas.setAttribute('width', fit.width)
|
||||
canvas.setAttribute('height', fit.height)
|
||||
await pica.resize(image, canvas, {
|
||||
quality: 0,
|
||||
alpha: true,
|
||||
unsharpAmount: 95,
|
||||
unsharpRadius: 0.9,
|
||||
unsharpThreshold: 70
|
||||
})
|
||||
this.productDialog.data.image = canvas.toDataURL()
|
||||
output = await pica.resize(image, canvas)
|
||||
this.productDialog.data.image = output.toDataURL('image/jpeg', 0.4)
|
||||
this.productDialog = {...this.productDialog}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user