benjaminadk / gif-encoder-2

Encode GIFs with Node
The Unlicense
58 stars 18 forks source link

useOptimizer problem #23

Closed drhuseyinunal closed 1 year ago

drhuseyinunal commented 1 year ago

i am using nodejs ES6.

const encoder = new GIFEncoder(img.width, img.height, 'neuquant');
encoder.setTransparent();
encoder.setDispose(true)
const encoder = new GIFEncoder(img.width, img.height, 'neuquant', false);
encoder.setTransparent();
encoder.setDispose(true)
const encoder = new GIFEncoder(img.width, img.height, 'neuquant', true);
encoder.setThreshold(100);
encoder.setTransparent();
encoder.setDispose(true)
const encoder = new GIFEncoder(img.width, img.height, 'neuquant', true);
encoder.setThreshold(0);
encoder.setTransparent();
encoder.setDispose(true)

i tried all of those different codes. but the issue is still continue. i am attaching the original gif, and the encoder-2's gif:

ORIGINAL: aDancingGuy

gif-encoder-2's: dancing

drhuseyinunal commented 1 year ago

The issue was caused by the code 'encoder.setDispose(true)'. deleting this fixed the problem encoder.setDispose(true)