Closed snaquekiller closed 6 years ago
@snaquekiller, sorry for the late reply.
I'd like to get clarification on your issue -- what are your expectations? You'll need to be more clear about what you expect.
I'm going to guess that you want to resize an animated GIF?
Same problem here
sample problem
java.lang.ArrayIndexOutOfBoundsException: 4096 at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:984) ~[na:1.8.0_60] at net.coobird.thumbnailator.tasks.io.InputStreamImageSource.read(Unknown Source) ~[thumbnailator-0.4.8.jar!/:0.4.8] at net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask.read(Unknown Source) ~[thumbnailator-0.4.8.jar!/:0.4.8] at net.coobird.thumbnailator.Thumbnailator.createThumbnail(Unknown Source) ~[thumbnailator-0.4.8.jar!/:0.4.8] at net.coobird.thumbnailator.Thumbnails$Builder.toOutputStream(Unknown Source) ~[thumbnailator-0.4.8.jar!/:0.4.8] at com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.getThumbImageStream(DefaultFastFileStorageClient.java:185) ~[fastdfs-client-1.25.4-RELEASE.jar!/:1.25.4-RELEASE] at com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadThumbImage(DefaultFastFileStorageClient.java:154) ~[fastdfs-client-1.25.4-RELEASE.jar!/:1.25.4-RELEASE]
https://github.com/DhyanB/Open-Imaging
I found a solution here, please solve this bug in the new version.
@freehuoshan , thank you for adding more information about this issue.
So this is an issue that the GIF decoder bundled with the JRE, and can be found discussed here: https://stackoverflow.com/questions/22259714/arrayindexoutofboundsexception-4096-while-reading-gif-file
Since Thumbnailator relies on the image readers and writers provided by Java Image I/O, providing bug fixes for those are out of scope of this project. I'm going to close this, as it's not a problem with Thumbnailator itself.
Expected behavior
Please describe what you are expecting the library to perform. create thumbnail
Actual behavior
Please describe the actual behavior you are experiencing, including stack trace and other information which would help diagnose the issue.
Steps to reproduce the behavior
Please enter step-by-step instructions for reproducing the actual behavior. Including code can be helpful in diagnosing issue, but please keep the code to a minimal that will reproduce the behavior. try to create thumbnail of this two gif
Environment
Please provide vendor and version information for the Operating System, JDK, and Thumbnailator. Please feel free to add any other information which may be pertinent.