mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 00:04:48 +02:00
Use octree with optimizer
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user