Skip to content

Commit

Permalink
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
brendan-duncan committed Apr 4, 2024
1 parent 54e6625 commit c84e0df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/formats/gif_decoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class GifDecoder extends Decoder {
if (frame.disposal == 2) {
nextImage.clear(colorMap.color(info!.backgroundColor!.r as int));
} else if (frame.disposal != 3) {
final nextBytes = nextImage.toUint8List();
/*final nextBytes = nextImage.toUint8List();
final lastBytes = lastImage.toUint8List();
final lp = lastImage.palette!;
for (var i = 0, l = nextBytes.length; i < l; ++i) {
Expand All @@ -223,7 +223,7 @@ class GifDecoder extends Decoder {
if (nc != -1) {
nextBytes[i] = nc;
}
}
}*/
}

nextImage.frameDuration = image.frameDuration;
Expand Down

0 comments on commit c84e0df

Please sign in to comment.