I know how to load and display an animated GIF in a javafx window, but what I need is to read the GIF image frame by frame and pixel by pixel. For example with PNG images, I use the PixelReader associated with the loaded Image and I can get the color of each pixel with the getColor(int x, int y) function with something like this :
PixelReader pixelReader = image.getPixelReader();
for (int line = 0; line < imageHeight; line++) {
for (int column = 0; column < imageWidth; column++) {
colors[column][line] = pixelReader.getColor(column, line));
}
}
But if I try the same kind of thing with an animated GIF, getPixelReader() returns null. According to Java doc, it could be because the image is "in a format that is not supported for reading and writing pixels to.".
Does anyone have an other solution?