chore(screenshotter): modernize calls to NodeJS Buffer interface (#2962)

Avoid DeprecationWarning during screenshotting

Co-authored-by: ylemkimon <y@ylem.kim>
This commit is contained in:
Erik Demaine
2021-04-30 16:06:04 -04:00
committed by GitHub
parent b90b724e34
commit 7377fea33a

View File

@@ -365,7 +365,7 @@ function setSize(reqW, reqH) {
}
function imageDimensions(img) {
const buf = new Buffer(img, "base64");
const buf = Buffer.from(img, "base64");
return {
buf: buf,
width: buf.readUInt32BE(16),