enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

GIF images should not be scaled #8004

Closed sgauruseu closed 4 years ago

sgauruseu commented 4 years ago

GIF images should be served as original binaries regardless of image service parameters. Now they are served correctly (as originals) in content thumbnail, media preview and image selector but attempted to be scaled inside image component and HTML Area which occasionally gives NPE because of high compression.

alansemenov commented 4 years ago

GIF that causes NPE:

vegardsgif

rymsha commented 4 years ago
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096
        at java.desktop/com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:992)
        at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1468)
        at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1363)
        at com.enonic.xp.image.ImageHelper.toBufferedImage(ImageHelper.java:54)
        at com.enonic.xp.core.impl.image.ImageServiceImpl.retrieveBufferedImage(ImageServiceImpl.java:233)

in reality issue is https://bugs.openjdk.java.net/browse/JDK-7132728