NightMonkeys
Additional plug-ins and extensions for Java's ImageIO using native libraries
Install / Use
/learn @gotson/NightMonkeysREADME
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 available
This 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 | Jpeg XL | ✔ | - | - | ✔ | See limitations in the plugin page | | webp | WebP | ✔ | - | - | ✔ | See limitations in the plugin page | | heif | HEIF & AVIF | ✔ | ✔ | - | ✔ | See limitations in the plugin page |
When possible, the plugins will use the extensive test suite from 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).- For Linux, normally it works fine when installed from a package manager. You can add the libraries' path to
the
LD_LIBRARY_PATHenvironment variable. - For Mac, if using HomeBrew, you will need to set
JAVA_LIBRARY_PATHto/usr/local/lib/or/opt/homebrew/lib/.
- For Linux, normally it works fine when installed from a package manager. You can add the libraries' path to
the
Installation
Gradle
runtimeOnly "com.github.gotson.nightmonkeys:imageio-{plugin}:{version}"
Gradle (Kotlin DSL)
runtimeOnly("com.github.gotson.nightmonkeys:imageio-{plugin}:{version}")
Maven
<dependency>
<groupId>com.github.gotson.nightmonkeys</groupId>
<artifactId>imageio-{plugin}</artifactId>
<version>{version}</version>
<scope>runtime</scope>
</dependency>
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
