Skip to content

Commit

Permalink
Revert "Fix palette"
Browse files Browse the repository at this point in the history
This reverts commit ef6344f.
  • Loading branch information
zk-phi committed Jun 24, 2024
1 parent ef6344f commit 8de8b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gifworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ctx.addEventListener("message", (msg) => {
palette.pop();
}
const colorFinder = genColorFinder(palette);
const transparentIndex = palette.length; // entry will be added later
const transparentIndex = palette.length;
frames.forEach((frame, frameIx) => {
// dither and binarize transparency first
if (transparent) {
Expand All @@ -65,7 +65,7 @@ ctx.addEventListener("message", (msg) => {
}
}
encoder.writeFrame(indexed, width, height, {
palette: frameIx === 0 ? [...palette, [0, 0, 0]] : undefined,
palette: frameIx === 0 ? palette : undefined,
delay,
transparent,
transparentIndex,
Expand Down

0 comments on commit 8de8b0e

Please sign in to comment.