modules/graphics/src/main/java/com/sun/javafx/iio/ImageStorage.java

Print this page
rev 8116 : RT-23180: Allow animated GIF to be loaded partially if it has errors in the data stream

*** 360,371 **** --- 360,376 ---- ImageFrame image = null; do { try { image = loader.load(imageIndex++, width, height, preserveAspectRatio, smooth); } catch (Exception e) { + // allow partially loaded animated images + if (imageIndex > 1) { + break; + } else { throw new ImageStorageException(e.getMessage(), e); } + } if (image != null) { image.setPixelScale(pixelScale); list.add(image); } else { break;