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

No suitable ImageReader found for source data(jpeg Picture format) #197

Closed
devinliu1 opened this issue Jun 23, 2022 · 2 comments
Closed

Comments

@devinliu1
Copy link

When using thumbnails to add watermarks

Thumbnails. of(inputStream). scale(1). outputQuality(1). toFile(filePath);

Throw exception net coobird. thumbnailator. tasks. UnsupportedFormatException: No suitable ImageReader found for source data

@coobird
Copy link
Owner

coobird commented Jun 23, 2022

Thumbnailator relies on the Image I/O API's to read/write images. As such, the supported image formats depend on what's available to the Java environment. More information in Which image formats are supported by Thumbnailator)

My guess would be that the file you think is a JPEG is not actually a JPEG. (For example, maybe the file is some other format like WebP but has a .jpg extension.) I can only guess based on the limited information provided.

Once you do find out what kind of image format it is, I would refer you back to the FAQ about supported image formats and see the next steps you can take.

@devinliu1
Copy link
Author

Thank you. The problem has been solved

@coobird coobird closed this as completed Jun 25, 2022
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