getCompressedJpegFromCanvas Function
Produce a jpeg compressed to no more than specified bytes and of no less than specified quality.
getCompressedJpegFromCanvas(canvas: HTMLCanvasElement, maxBytes: number = 60000, minCompressionQuality: number = 0.1): string | undefined
extensions
Returns - string | undefined
A data URL for the image, or undefined
if the compression and size constraints could not be met.
Defined in
- core/frontend/src/ImageUtil.ts Line 340
Last Updated: 20 June, 2023