Closed L3viathan closed 5 years ago
I just tried it out with animated gifs: It works, but transparent pixels that were not transparent in the previous frame keep their original color.
Thank you very much for contributing! Sadly, at the moment I do not have the time to test it thoroughly.
As far as removing the grid is concerned, I would have preserved the old functionality as default behaviour and remove it with an explicit flag. A thing that bothers me is this placeholder value - there must be another way to do it, it just does not feel right.
Another thing to note is that I still have not figured out the correct way to display transparency in gifs. This one is still bugging me. I guess in the end it will be just a bunch of flags that make the transparency work in different way so that viu
offers a suitable option for any kind of gif.
I am leaving the PR open for now, but I will not be able to help with development in the next couple of weeks.
Thanks for your response. I changed some things: The option --transparent
/-t
now toggles my behaviour, the default being what was done before.
I also managed to find a way around using the Magenta placeholder — Options. I guess this is really what they're meant for.
Awesome, great work! It looks much nicer now. Thanks for the feature!
This implements "truly" transparent pixels as described in #10, while throwing away the old way (the grid). I don't know if you want to keep it or not.
I'm using the color
Color::Magenta
as a placeholder for transparency, because the colorspec doesn't support it otherwise, and the rest of the code uses RGB colors exclusively. This shouldn't break displaying actually magenta pictures.Code may or may not be terrible; I'm a Rust noob.