I'm making a simple image editor using javafx and am running into a problem with GIFs. Whenever I load an animated GIF, the program will not apply filters, nor will I be able to reload the image. Is there any way to just get the first frame without reading it in byte by byte and stopping after reading the first image's data?
Here's how I'm reading it in:
public static Image read(File file) {
try (FileInputStream fileStream = new FileInputStream(file)) {
return new Image(fileStream);
}
The catch has been left out for brevity.