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

identifier may not be blank #185

Closed
bikerr opened this issue Jan 26, 2022 · 3 comments
Closed

identifier may not be blank #185

bikerr opened this issue Jan 26, 2022 · 3 comments

Comments

@bikerr
Copy link

bikerr commented Jan 26, 2022

An error is reported when I execute this code with the image

Thumbnails.of(src).scale(1.0).outputQuality(0.2).toFile(dst);
java.lang.IllegalArgumentException: identifier may not be blank
	at com.twelvemonkeys.lang.Validate.notEmpty(Validate.java:47)
	at com.twelvemonkeys.imageio.plugins.jpeg.Application.<init>(Application.java:54)
	at com.twelvemonkeys.imageio.plugins.jpeg.Application.read(Application.java:96)
	at com.twelvemonkeys.imageio.plugins.jpeg.Segment.read(Segment.java:94)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.initHeader(JPEGImageReader.java:721)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.getSOF(JPEGImageReader.java:784)
	at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReader.getWidth(JPEGImageReader.java:244)
	at net.coobird.thumbnailator.tasks.io.InputStreamImageSource.readImage(Unknown Source)
	at net.coobird.thumbnailator.tasks.io.InputStreamImageSource.read(Unknown Source)
	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.toFile(Unknown Source)
@coobird
Copy link
Owner

coobird commented Jan 26, 2022

@bikerr There's not enough information about your environment to reliably reproduce the issue.

Which version of Thumbnailator, TwelveMonkeys and Java are you using?

I've tried with 0.4.16, 3.8.1, 8 respectively, and have been unable to reproduce this using the image provided.

What are the types for src and dst? Are they String or File?
What is the value for dst? Does it end with a "jpg" extension?

@bikerr
Copy link
Author

bikerr commented Jan 26, 2022

@coobird
src and dst are both end with jpg File

The environment is :

thumbnailator:0.4.16
twelvemonkeys:3.3
java version "1.8.0_321"

@coobird
Copy link
Owner

coobird commented Jan 26, 2022

@bikerr OK, I was able to reproduce it using TwelveMonkeys ImageIO 3.3.

This appears to be an issue with TwelveMonkeys ImageIO library rather than Thumbnailator.

In fact, seems like this behavior is not triggered in TwelveMonkeys ImageIO 3.4, so maybe you should consider updating your dependencies, if possible. (As I mentioned earlier, the latest version 3.8.1 also didn't exhibit this behavior.)

I'm closing this issue as it's not an issue with Thumbnailator.

@coobird coobird closed this as completed Jan 26, 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