Skip to content

Fix GIF animation import colors, empty frames and palettes - #190

Merged
AsYlum- merged 5 commits into
masterfrom
fix/gif-import-transparency
Nov 12, 2026
Merged

AsYlum- merged 5 commits into
masterfrom
fix/gif-import-transparency

Conversation

@AsYlum-

@AsYlum- AsYlum- commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator
  • Transparent spots in game: background removal compared colors after reducing them to 5 bits per channel, so 248–255 white (and 168–175 grey in CV5/KR) became transparent. Now matched on the exact source color.
  • Empty frames: Add / All directions add imported GIFs as empty frames, and only their first frame.
  • Palettes: built from every frame of an import, colors outside the palette map to the closest entry instead of index 0 (black pixels), and existing frames are no longer recolored.
  • Bmp/Jpg export: frames are saved on white instead of black, so they re-import cleanly.
  • All directions add: also takes an action's exported images (..._{direction}_{frame}) and replaces its frames, keeping each frame's center.

Closes #45
Closes #28

Convert each GIF frame instead of a blank bitmap, and keep all frames
of the GIF instead of a one-frame copy.
Match background colours on the source colour, not after the drop to 5 bits,
which made pixels of 248-255 white (and 168-175 grey in CV5/KR) transparent.
Adding or replacing frames fits the palette to their colours, reducing past 256 and mapping
to the nearest colour instead of index 0; existing frames keep their colours.
Without transparency the background came out black and re-imported as a black box; import removes white.
Images named ..._{direction}_{frame} are sorted into directions and frames; each frame keeps the
center of the frame it replaces. Five GIFs work as before.
@AsYlum-
AsYlum- merged commit 31d651b into master Nov 12, 2026
1 check passed
@AsYlum-
AsYlum- deleted the fix/gif-import-transparency branch November 12, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible bug with color encoding and conversion Animation edit bug

1 participant