Skip to content

Commit

Permalink
fix: Disable palette remapping for animated GIFs
Browse files Browse the repository at this point in the history
Current implementation has performance issues
  • Loading branch information
yegor-pelykh committed Apr 12, 2024
1 parent eba6a92 commit ea821d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/formats/gif-decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ export class GifDecoder implements Decoder {
if (frame.disposal === 2) {
nextImage.clear(colorMap.getColor(this._info.backgroundColor!.r));
} else if (frame.disposal !== 3) {
/*
const nextBytes = nextImage.toUint8Array();
const lastBytes = lastImage.toUint8Array();
const lp = lastImage.palette!;
Expand All @@ -733,6 +734,7 @@ export class GifDecoder implements Decoder {
nextBytes[i] = nc;
}
}
*/
}

nextImage.frameDuration = image.frameDuration;
Expand Down

0 comments on commit ea821d5

Please sign in to comment.