MCPcopy
hub / github.com/HashLips/hashlips_art_engine / draw

Function draw

utils/pixelate.js:52–59  ·  view source on GitHub ↗
(_imgObject)

Source from the content-addressed store, hash-verified

50};
51
52const draw = (_imgObject) => {
53 let size = pixelFormat.ratio;
54 let w = canvas.width * size;
55 let h = canvas.height * size;
56 ctx.imageSmoothingEnabled = false;
57 ctx.drawImage(_imgObject.loadedImage, 0, 0, w, h);
58 ctx.drawImage(canvas, 0, 0, w, h, 0, 0, canvas.width, canvas.height);
59};
60
61const saveImage = (_loadedImageObject) => {
62 fs.writeFileSync(

Callers 1

startCreatingFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected