You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While creating a frame in the process of encoding, this library is able to quantize the colors in an rgba buffer to a pallete of 256 colors. I'm interested in reducing this pallete size to reduce the size of the produced gif.
In short, I would like to extend this method on Frame:
Alternatively, I could implement the relevant functionality myself and pass the indexed pixels and pallete to the appropriate constructor, but I think it would be nice to expose an option to tune the pallete size since the library already seems to do the work for me.
The text was updated successfully, but these errors were encountered:
The neuquant algorithm these functions use is poorly suited for lower numbers of colors (it assumes all the colors form a smooth gradient, and lower numbers of colors have discontinuities it doesn't handle).
Reducing the number of colors by half only reduces LZW symbol sizes by 1/9th. Lowering number of colors usually adds more dithering noise, which also counteracts the savings from fewer colors.
While creating a frame in the process of encoding, this library is able to quantize the colors in an rgba buffer to a pallete of 256 colors. I'm interested in reducing this pallete size to reduce the size of the produced gif.
In short, I would like to extend this method on
Frame
:to something like this:
Alternatively, I could implement the relevant functionality myself and pass the indexed pixels and pallete to the appropriate constructor, but I think it would be nice to expose an option to tune the pallete size since the library already seems to do the work for me.
The text was updated successfully, but these errors were encountered: