Updated webp4j to version 1.4.0

This commit is contained in:
Jindra Petřík
2026-01-16 21:22:11 +01:00
parent 53a527adf9
commit 15e31abc43
7 changed files with 3 additions and 9 deletions

View File

@@ -17,7 +17,6 @@
package com.jpexs.decompiler.flash.tags.enums;
import dev.matrixlab.webp4j.WebPCodec;
import java.awt.image.BufferedImage;
/**
* Image format.
@@ -68,12 +67,7 @@ public enum ImageFormat {
public boolean available() {
if (this == WEBP) {
//WEBP may be unavailable on some platforms, we're gonna test sample call
try {
WebPCodec.encodeLosslessImage(new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB));
} catch (Throwable t) {
return false;
}
return WebPCodec.isAvailable();
}
return true;
}