Exception in thread "main" java.util.ServiceConfigurationError: com.sksamuel.scrimage.nio.ImageReader: Provider com.sksamuel.scrimage.webp.WebpImageReader could not be instantiated
[...]
at com.sksamuel.scrimage.nio.ImageReaders.detectReaders(ImageReaders.java:26)
at com.sksamuel.scrimage.nio.ImageReaders.detectReaders(ImageReaders.java:22)
at com.sksamuel.scrimage.nio.ImageReaders.<clinit>(ImageReaders.java:19)
at com.sksamuel.scrimage.nio.ImmutableImageLoader.load(ImmutableImageLoader.java:137)
at com.sksamuel.scrimage.nio.ImmutableImageLoader.fromFile(ImmutableImageLoader.java:104)
Caused by: java.lang.ExceptionInInitializerError
at com.sksamuel.scrimage.webp.WebpImageReader.<init>(WebpImageReader.java:11)
[...]
Caused by: java.lang.RuntimeException: java.io.IOException: Could not locate webp binary at [/webp_binaries/dwebp, /webp_binaries/window/dwebp, /webp_binaries/windows/dwebp, /dist_webp_binaries/libwebp-1.3.0-windows-x64/bin/dwebp]
at com.sksamuel.scrimage.webp.DWebpHandler.<clinit>(DWebpHandler.java:20)
[...]
Caused by: java.io.IOException: Could not locate webp binary at [/webp_binaries/dwebp, /webp_binaries/window/dwebp, /webp_binaries/windows/dwebp, /dist_webp_binaries/libwebp-1.3.0-windows-x64/bin/dwebp]
at com.sksamuel.scrimage.webp.WebpHandler.installBinary(WebpHandler.java:40)
at com.sksamuel.scrimage.webp.DWebpHandler.installDWebp(DWebpHandler.java:35)
at com.sksamuel.scrimage.webp.DWebpHandler.<clinit>(DWebpHandler.java:18)
The same code works as expected on version 4.0.33.
Tested on Windows using OpenJDK8/11/17 and GraalVM17.
After upgrading from version 4.0.33 to 4.0.34, the parsing of WebP files seems to be broken.
Gradle:
Code:
Result:
The same code works as expected on version 4.0.33.
Tested on Windows using OpenJDK8/11/17 and GraalVM17.