Hi,
When using canvas.toBuffer(), we get the following error :
(node:998380) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Code :
import {Canvas} from "canvas";
const canvas = new Canvas(W,H);
// do stuff
canvas.toBuffer()
See also : https://stackoverflow.com/a/52257416
Deno : deno 2.4.5 (stable, release, x86_64-unknown-linux-gnu) - v8 13.7.152.14-rusty - typescript 5.8.3
Canvas : 3.2.0