mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-09 14:31:55 +00:00
Added: #2608 Updated WEBP image library so now it supports macOS x64
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.tags.enums;
|
||||
|
||||
import dev.matrixlab.webp4j.NativeWebP;
|
||||
import dev.matrixlab.webp4j.WebPCodec;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
/**
|
||||
* Image format.
|
||||
@@ -67,8 +67,9 @@ public enum ImageFormat {
|
||||
|
||||
public boolean available() {
|
||||
if (this == WEBP) {
|
||||
try {
|
||||
new NativeWebP();
|
||||
//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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user