Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xd3adcode/aetherjfx-imagedecoder-avif
AetherJFX (JavaFX) image decoding (IIO) AVIF plugin
https://github.com/0xd3adcode/aetherjfx-imagedecoder-avif
avif image javafx
Last synced: 7 days ago
JSON representation
AetherJFX (JavaFX) image decoding (IIO) AVIF plugin
- Host: GitHub
- URL: https://github.com/0xd3adcode/aetherjfx-imagedecoder-avif
- Owner: 0xD3ADCODE
- Created: 2024-11-10T11:08:30.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-10T13:43:44.000Z (2 months ago)
- Last Synced: 2024-11-10T14:31:43.469Z (2 months ago)
- Topics: avif, image, javafx
- Language: Java
- Homepage:
- Size: 958 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![AetherJFX](https://img.shields.io/badge/Only%20for:-AetherJFX-blue)](https://github.com/0xD3ADCODE/AetherJFX)
![Java](https://img.shields.io/badge/Java-17-b07219)# AetherJFX AVIF Image Decoder Plugin
> [!WARNING]
> This plugin is designed to be used ONLY with [JavaFX](https://github.com/openjdk/jfx) fork [AetherJFX](https://github.com/0xD3ADCODE/AetherJFX). Attempting to use it with standard JavaFX will lead to an exception![AVIF](https://github.com/AOMediaCodec/libavif) image decoding plugin for [AetherJFX](https://github.com/0xD3ADCODE/AetherJFX)
Based on [vavi-image-avif](https://github.com/umjammer/vavi-image-avif) and integrates into JavaFX's `ImageIO` (`IIO`) instead of default one that depends on `AWT`
## Dependency
> [!WARNING]
> Prebuild `Windows x86-64` library is included into jar. Refer to [libavif](https://github.com/AOMediaCodec/libavif) repository for installation guide for other systemsDefine custom Gradle ivy repository in `repositories` block:
```groovy
repositories {
//...your repositories
def github = ivy {
url 'https://github.com/'
patternLayout {
artifact '/[organisation]/[module]/releases/download/[revision]/[artifact].[ext]'
}
metadataSources { artifact() }
}
exclusiveContent {
forRepositories(github)
filter { includeGroup("0xD3ADCODE") }
}
}
```Add dependency into `dependencies` block:
```groovy
dependencies {
//...your dependencies
implementation("0xD3ADCODE:AetherJFX-ImageDecoder-AVIF:{version}") {
artifact {
name = 'AetherJFX-ImageDecoder-AVIF-{version}'
type = 'jar'
}
}// JNA is required for native library
implementation 'net.java.dev.jna:jna:5.14.0'
}
```Replace `{version}` with latest [Release](https://github.com/0xD3ADCODE/AetherJFX-ImageDecoder-AVIF/releases) tag (eg, `v1.0`)
## Usage
Register plugin as soon as possible (before JavaFX Toolkit start) with just one line of code:
```java
AVIFLoader.register();
```After that all AVIF images will be decoded using newly installed decoder directly into JavaFX's `Image` without `AWT`
## Development
To properly build `jar` by yourself, clone repository and create `gradle.properties` file with:
```text
AETHER_JFX_SDK_PATH =
```## Credits
[AOMediaCodec](https://github.com/AOMediaCodec) for [AVIF](https://github.com/AOMediaCodec/libavif) decoder
[umjammer](https://github.com/umjammer/) for [vavi-image-avif](https://github.com/umjammer/vavi-image-avif) AVIF decoder/encoder implementation for Java