diff --git a/src/apis/toPng.js b/src/apis/toPng.js index a236c7b..48f2313 100644 --- a/src/apis/toPng.js +++ b/src/apis/toPng.js @@ -1,4 +1,4 @@ -import { createCanvas } from "canvas-renderer"; +import canvasRenderer from "canvas-renderer"; import { iconGenerator } from "../renderer/iconGenerator"; import { isValidHash, computeHash } from "../common/hashUtils"; import { getConfiguration } from "../common/configuration"; @@ -14,7 +14,7 @@ import { CanvasRenderer } from "../renderer/canvas/index"; * @returns {Buffer} PNG data */ export function toPng(hashOrValue, size, config) { - const canvas = createCanvas(size, size); + const canvas = canvasRenderer.createCanvas(size, size); const ctx = canvas.getContext("2d"); iconGenerator(new CanvasRenderer(ctx, size),