weaveDocs
weave / weaveImage

Function: weaveImage()

weaveImage(options): WeaveImage
新しいWeaveImageオブジェクトを作成する

パラメータ

options: WeaveImageInput このメディアタイプのオプション
  • data: The raw image data as a Buffer
  • imageType: (Optional) The type of image file, currently only ‘png’ is supported

戻り値

WeaveImage

const imageBuffer = fs.readFileSync('path/to/image.png');
const weaveImage = weaveImage({ data: imageBuffer });

定義場所

media.ts:28