Use octree with optimizer

This commit is contained in:
Dragon Fire
2024-04-25 00:51:13 -04:00
parent 3eed5c373b
commit 0711f5a43d
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ module.exports = class PetCommand extends Command {
async run(msg, { image }) {
const { body } = await request.get(image);
const data = await loadImage(body);
const encoder = new GIFEncoder(112, 112);
const encoder = new GIFEncoder(112, 112, 'octree', true);
const canvas = createCanvas(112, 112);
const ctx = canvas.getContext('2d');
encoder.start();
+1 -1
View File
@@ -38,7 +38,7 @@ module.exports = class ShakeCommand extends Command {
const base = await loadImage(body);
const ratio = base.width / base.height;
const height = 512 / ratio;
const encoder = new GIFEncoder(512, height);
const encoder = new GIFEncoder(512, height, 'octree', true);
const canvas = createCanvas(512, height);
const ctx = canvas.getContext('2d');
encoder.start();