coobird / thumbnailator

Thumbnailator - a thumbnail generation library for Java
MIT License
5.14k stars 784 forks source link

No suitable ImageReader found for C:\Users\LKhore\Pictures\Screenshots\desktop.ini #146

Closed lkhore closed 4 years ago

lkhore commented 4 years ago

Expected behavior

Please describe what you are expecting the library to perform.

Actual behavior

Please describe the actual behavior you are experiencing, including stack trace and other information which would help diagnose the issue.

net.coobird.thumbnailator.tasks.UnsupportedFormatException: No suitable ImageReader found for C:\Users\LKhore\Pictures\Screenshots\desktop.ini. at net.coobird.thumbnailator.tasks.io.FileImageSource.read(Unknown Source) at net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask.read(Unknown Source) at net.coobird.thumbnailator.Thumbnailator.createThumbnail(Unknown Source) at net.coobird.thumbnailator.Thumbnails$Builder.asFiles(Unknown Source)Disconnected from the target VM, address: '127.0.0.1:50696', transport: 'socket'

at net.coobird.thumbnailator.Thumbnails$Builder.toFiles(Unknown Source)
at net.coobird.thumbnailator.Thumbnails$Builder.toFiles(Unknown Source)
at Thumb.main(Thumb.java:13)

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.

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.

thanossv commented 4 years ago

From what I see, the program attempted to process the hidden windows file "desktop.ini", but, since it's not an image, it failed. Try to exclude this file from processing to see if this resolves your issue.

Cheers, Thanos

coobird commented 4 years ago

As @thanossv, it appears to be an issue with attempting to read desktop.ini which is not an image.