-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Hi there,
not sure what's the point in making GifEncoder final,
In many implementations you would like to leverage multi threads to make the Image.fromRGB calls in parallel, rather than passing int[][] around and making Image.fromRGB from the internal API.
My use case: I download 10 images from the internet (in parallel) and create the int[][] in those threads. I could as well call Image.fromRGB from those threads, but I can't because addImage is a private method.
Furthermore, if I could extend that method, I would move everything to multiple threads, and synchronize only on ImageDataBlock.write.
If you agree, I can send a PR. The new code takes 2 seconds to generate an output that was taking 17s. I just reorganized the same code and haven't change any line.
thanks!