some paint code based on konva
import { getPaintData } from 'paint-core';
const data = await getPaintData(data, {
format: 'png' // or jpg
width: 500 // paint width. 500 by default;
output: 'base64' // or local_file
fileUrl: '' // a local file address. Required when output is local_file
quality: 1 // paint quality 0 to 1
});