weaveImage
weave / weaveImage
Function: weaveImage()
weaveImage(
options
):WeaveImage
Defined in: media.ts:28
Create a new WeaveImage object
Parameters
options
WeaveImageInput
The options for this media type
- data: The raw image data as a Buffer
- imageType: (Optional) The type of image file, currently only 'png' is supported
Returns
Example
const imageBuffer = fs.readFileSync('path/to/image.png');
const weaveImage = weaveImage({ data: imageBuffer });