MCPcopy
hub / github.com/exceljs/exceljs / addImage

Method addImage

lib/stream/xlsx/workbook-writer.js:125–130  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

123 }
124
125 addImage(image) {
126 const id = this.media.length;
127 const medium = Object.assign({}, image, {type: 'image', name: `image${id}.${image.extension}`});
128 this.media.push(medium);
129 return id;
130 }
131
132 getImage(id) {
133 return this.media[id];

Callers

nothing calls this directly

Calls 2

assignMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected