mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -40,7 +40,7 @@ module.exports = class ChocolateMilkCommand extends Command {
|
||||
const overlay = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'chocolate-milk.png'));
|
||||
const { body } = await request.get(image);
|
||||
const base = await loadImage(body);
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
const canvas = createCanvas(overlay.width, overlay.height);
|
||||
const scaleH = overlay.width / base.width;
|
||||
const height = Math.round(base.height * scaleH);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
@@ -48,7 +48,7 @@ module.exports = class SipCommand extends Command {
|
||||
const overlay = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'sip.png'));
|
||||
const { body } = await request.get(image);
|
||||
const base = await loadImage(body);
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
const canvas = createCanvas(overlay.width, overlay.height);
|
||||
const scaleH = overlay.width / base.width;
|
||||
const height = Math.round(base.height * scaleH);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
Reference in New Issue
Block a user