MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / send

Method send

tools/png2bmp.js:518–523  ·  view source on GitHub ↗
(pixels, offset = 0, count = pixels.byteLength - offset)

Source from the content-addressed store, hash-verified

516 this.height & 0xFF);
517 }
518 send(pixels, offset = 0, count = pixels.byteLength - offset) {
519 pixels = new Uint8Array(pixels);
520 if ((0 !== offset) || (count !== pixels.byteLength))
521 pixels = pixels.slice(offset, offset + count);
522 this.file.write(pixels.buffer);
523 }
524 end() {
525 this.file.close();
526 delete this.file;

Callers 1

runMethod · 0.45

Calls 2

sliceMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected