|
@@ -6,6 +6,8 @@ var tape = require("tape"),
|
6
|
6
|
initializeCanvas = require("../audiogram/initialize-canvas.js"),
|
7
|
7
|
drawFrames = require("../audiogram/draw-frames.js");
|
8
|
8
|
|
|
9
|
+const { Image } = require("canvas");
|
|
10
|
+
|
9
|
11
|
require("mkdirp").sync(path.join(__dirname, "tmp", "frames"));
|
10
|
12
|
|
11
|
13
|
var frameDir = path.join(__dirname, "tmp", "frames");
|
|
@@ -81,8 +83,7 @@ function checkFrame(test, options) {
|
81
|
83
|
|
82
|
84
|
test.error(e);
|
83
|
85
|
|
84
|
|
- const canvas = Canvas.createCanvas();
|
85
|
|
- var img = canvas.Image;
|
|
86
|
+ const img = new Image();
|
86
|
87
|
img.src = f1;
|
87
|
88
|
|
88
|
89
|
var bg = getColor(options.backgroundColor || "#fff"),
|