Open lunahhhhhhhhhhhhhhhh opened 2 months ago
My own qualms with the current feature are that black areas of a background image go transparent which I attempted to fix here https://github.com/JannisX11/blockbench/pull/2259 but also I get flickering in the background image of a gif which I assume is from the algorithim to reduce the color palette as playing with the format/encoding function in screenshot.js didn't help much
The format is a good catch, I used rgba4444 because I thought it was the only one with alpha support, but it's just the added alpha channel and the other formats work with 1 bit alpha as well. Switched to rgb565 as the default now since alpha channels aren't fully supported either way.
Options I have found for making the frames of the animation gif-ready:
Both of these options don't seem to work with gifenc
so it may need to be paired with omggif
Detailed description of your suggestion
I have noticed some functionality that might be great to add to the in-editor gif recording for those that can't use the ffmpeg-based plugin (web/mobile users);
Ability to choose quality when recording gif: the gif recording functionality in the app seems to have been written from a performance standpoint e.g. it uses the lower quality format
rgba4444
instead of full qualityrgb565
that is available. This makes sense from a performance consideration standpoint, however it would be great to be able to choose quality at the same time when choosing other settings, so if you need a high quality version you can get this. Use of web-workers (as suggested by the gifenc library blockbench is using) would be a great way to reduce the impact of the higher quality on performance. Also the GIFEnc library used appears to implement an algorithm that is geared toward performance, not quality. Could look at implementing a different library such as amazing-gif that uses a different algorithm and bonus is it supports web-workers out of the box.Add dithering option; I have also noted that there is no use of dithering which would be another great option to have. There is a development branch of the gifenc library that adds support for this which we could look at using either by adding a dithering class into Blockbench, making a fork of the library or using the commit as a dependency to include this. Again this has a performance impact, so usage of this with workers if possible would be great