Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gotson/nightmonkeys
Additional plug-ins and extensions for Java's ImageIO using native libraries
https://github.com/gotson/nightmonkeys
imageio java java-imageio java19 jpeg-xl jxl plugins webp
Last synced: about 2 months ago
JSON representation
Additional plug-ins and extensions for Java's ImageIO using native libraries
- Host: GitHub
- URL: https://github.com/gotson/nightmonkeys
- Owner: gotson
- License: mit
- Created: 2022-03-31T07:00:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T09:37:28.000Z (8 months ago)
- Last Synced: 2024-05-01T12:55:42.947Z (8 months ago)
- Topics: imageio, java, java-imageio, java19, jpeg-xl, jxl, plugins, webp
- Language: Java
- Homepage:
- Size: 7.52 MB
- Stars: 35
- Watchers: 4
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/gotson/NightMonkeys/ci.yml?branch=main&style=flat-square)](https://github.com/gotson/NightMonkeys/actions/workflows/ci.yml)
[![Maven Central](https://img.shields.io/maven-central/v/com.github.gotson.nightmonkeys/imageio-jxl?color=blue&style=flat-square)](https://search.maven.org/search?q=g:com.github.gotson.nightmonkeys)
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/com.github.gotson.nightmonkeys/imageio-jxl?color=blue&label=maven-snapshot&server=https%3A%2F%2Foss.sonatype.org&style=flat-square)](https://oss.sonatype.org/content/repositories/snapshots/com/github/gotson/nightmonkeys/)# NightMonkeys
A collection of ImageIO plugins, adding support for newer image formats. NightMonkeys uses the Foreign Linker API
available since JDK 22 to access native libraries.## How it works
NightMonkeys plugins are released as multi-release JARs:
- with Java < 22, a no-op version of the plugin will unregister itself on load, basically doing nothing
- with Java 22+, the plugin will be availableThis lets you add the dependencies in your project whatever the JDK used, and still enable the plugin at runtime if the necessary JDK is used.
## Supported formats
| Plugin | Format | Read | Write | Metadata | TwelveMonkeys Tests | Notes |
|----------------------|----------------------------------------------------------------------------------------------------------------------|------|-------|----------|---------------------|------------------------------------|
| [jxl](imageio-jxl) | [Jpeg XL](https://jpeg.org/jpegxl/) | ✔ | - | - | ✔ | See limitations in the plugin page |
| [webp](imageio-webp) | [WebP](https://developers.google.com/speed/webp) | ✔ | - | - | ✔ | See limitations in the plugin page |
| [heif](imageio-heif) | [HEIF](https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format) & [AVIF](https://en.wikipedia.org/wiki/AVIF) | ✔ | - | - | ✔ | See limitations in the plugin page |When possible, the plugins will use the extensive test suite
from [TwelveMonkeys](https://github.com/haraldk/TwelveMonkeys), which covers much more test cases than simple
decoding/encoding.## Requirements
In order for the plugins to run properly, you will need to:
- Run Java 22 with the following options:
```
--enable-native-access=ALL-UNNAMED
```- Make sure the path to the directory containing the native libraries is contained in the Java system
property `java.library.path` (check
also [this](https://stackoverflow.com/questions/20038789/default-java-library-path)).
- For Linux, normally it works fine when installed from a package manager. You can add the libraries' path to
the `LD_LIBRARY_PATH` environment variable.
- For Mac, if using HomeBrew, you will need to set `JAVA_LIBRARY_PATH` to `/usr/local/lib/` or `/opt/homebrew/lib/`.## Installation
### Gradle
```groovy
runtimeOnly "com.github.gotson.nightmonkeys:imageio-{plugin}:{version}"
```### Gradle (Kotlin DSL)
```kotlin
runtimeOnly("com.github.gotson.nightmonkeys:imageio-{plugin}:{version}")
```### Maven
```xml
com.github.gotson.nightmonkeys
imageio-{plugin}
{version}
runtime```