Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion error caused by image reading failure #216

Closed
CKReliancd opened this issue Jan 4, 2024 · 1 comment
Closed

Conversion error caused by image reading failure #216

CKReliancd opened this issue Jan 4, 2024 · 1 comment

Comments

@CKReliancd
Copy link

Expected behavior

bgi

Thumbird读取文件错误

报错信息.txt

This is the image of the failed read, error message, and related version. How can I solve this problem

Steps to reproduce the behavior

net.coobird.thumbnailator.tasks.UnsupportedFormatException: No suitable ImageReader found for source data.
at net.coobird.thumbnailator.tasks.io.InputStreamImageSource.read(Unknown Source)
at net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask.read(Unknown Source)

Environment

jdk1.8
centos7
net.coobird
thumbnailator
0.4.20

@coobird
Copy link
Owner

coobird commented Feb 10, 2025

@CKReliancd, not sure if you're still having this issue, but looking into the attached file, I see it is actually a WebP image file with a PNG extension. (In other words, the file extension doesn't match the actual file format.)

Here's the output from exiftool for the attached file:

$ exiftool 294106976-7a497712-90c0-4c0e-adeb-fc6dc55c3559.png 
ExifTool Version Number         : 12.76
File Name                       : 294106976-7a497712-90c0-4c0e-adeb-fc6dc55c3559.png
Directory                       : .
File Size                       : 10 kB
File Modification Date/Time     : 2025:02:10 10:27:04+09:00
File Access Date/Time           : 2025:02:10 10:27:17+09:00
File Inode Change Date/Time     : 2025:02:10 10:27:08+09:00
File Permissions                : -rw-rw-r--
File Type                       : WEBP
File Type Extension             : webp
MIME Type                       : image/webp
VP8 Version                     : 0 (bicubic reconstruction, normal loop)
Image Width                     : 500
Horizontal Scale                : 0
Image Height                    : 500
Vertical Scale                  : 0
Image Size                      : 500x500
Megapixels                      : 0.250

Since by default, Java doesn't bundle support for reading/writing WebP files, Thumbnailator cannot open the file. To be able to read the file, you'll need to include a Image I/O plugin for WebP. Please refer to this FAQ for more information.

@coobird coobird closed this as completed Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants