Open rosemash opened 4 years ago
Yeah I'm aware of this behavior. It's tricky to get this exactly right, as gifs have a maximum of 256 colors, while pngs can old millions. In the master
branch, there is a command p/sample
to load the view colors into the palette. You could run this command before exporting to gif.
I think one potential long term solution is to scan the view buffer for all colors and add them to the gif palette. If there are more than 256, we can throw an error and refuse to export.
Issue: When exporting as a gif, it seems that colors which aren't part of the palette end up not being in the final gif. Those pixels end up transparent or simply the wrong color.
How to reproduce: Open a png file with
rx file.png
where file.png is an image containing colors that aren't in the starting palette. Split into multiple frames, then export as a gif. Switch to a palette with the required colors, then export as a second gif. The first gif has missing colors, but the second gif is correct.