Function: readShapeImage()
readShapeImage(
blob,__namedParameters?):Promise<ShapeImage>
Defined in: src/lib/brushes/shapeImage/index.ts:42
Turn a PNG file into a brush shape: at most 2 MB, shrunk to at most 512 pixels on its longest side, as a PNG data
URL. Its alpha is used as is. Throws a ShapeImageError if it can't be used.
Parameters
blob
Blob
__namedParameters?
Returns
Promise<ShapeImage>
Example
const shape = await readShapeImage(input.files[0]); // { image: "data:image/png;base64,…", width: 120, height: 80 }