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