gifencoder icon indicating copy to clipboard operation
gifencoder copied to clipboard

Serious problem with performance

Open PavelTurk opened this issue 1 year ago • 0 comments

I am testing converting images to GIF. I have 50 images (5 seconds with 10 fps) and every image size is 1000x750. Adding all images to encoder takes me about two minutes. This is my code:

var gifEncoder = new GifEncoder(outputStream, (int) width, (int) height, 0);
var imageOption = new ImageOptions();
imageOption.setDelay(delay, TimeUnit.MILLISECONDS);
for (var image : images) {
   var rgb = ....
   gifEncoder.addImage(rgb, imageOption);//this line code is very slow
}

Could anyone say how to fix this problem?

PavelTurk avatar Nov 16 '24 12:11 PavelTurk