Skip to content

Commit

Permalink
Fix writing transparent GIFs
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaaaa123456789 committed Jan 31, 2022
1 parent 309edf0 commit beb60b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Note: releases are listed from latest to oldest.
## Version 1.0 (in development)

- Fixed a bug when loading APNG files with reduced frames
- Fixed emitting GIF files with transparent pixels
- Fixed a bug in the GIF compressor that would generate invalid compressed frame data when a code size increase and
reduction occured at the same time
- Fixed a file descriptor leak that would keep an open `FILE *` if a `PLUM_ERR_FILE_ERROR` error was raised while
Expand Down
2 changes: 1 addition & 1 deletion src/gifwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void generate_GIF_frame_data (struct context * context, uint32_t * restrict pixe
int transparent_index = -1;
if (transparent)
for (index = 0; index <= colorcount; index ++) if (palette[index] == transparent) {
transparent_index = transparent;
transparent_index = index;
break;
}
write_GIF_frame(context, framebuffer, palette, colorcount + 1, transparent_index, frame, left, top, width, height, durations, disposals);
Expand Down

0 comments on commit beb60b4

Please sign in to comment.