JDK 26 · stable FFM · Apache-2.0

Decode broadly.
Encode small.

Native-quality AVIF and JPEG conversion that deploys like an ordinary JVM library. No CLI, package installation, JNI, or runtime download.

  • Boundedinput, memory, output and concurrency
  • Targetedmusl by default; other platforms explicit
  • Modularship only the codecs your product needs
build.gradle.kts
dependencies {
    implementation("no.beint.glimt:all:0.5.0")
}
Images.java
var images = ImageConverter.builder()
    .longestEdge(1600)
    .quality(85)
    .build();

byte[] avif = images.toAvif(upload);
$ java --enable-native-access=ALL-UNNAMED -jar app.jar

Bring the JAR. Nothing else. Glimt defaults to ReAI's musl runtime; select macOS, glibc or a portable bundle explicitly.

macOS ARM64Linux glibcLinux musl

The useful formats, built in

One pipeline.
Independent codecs.

Content detection, orientation, colour handling, resizing and limits are shared. Add or remove decoders without changing application code.

AV

AVIF

libavif, libaom and dav1d. Alpha and high bit depth.

JP

JPEG + JPEGli

Fast decoding and highly efficient standard JPEG output.

PN

PNG + APNG

Palette, alpha, interlace, profiles and 16-bit input.

WP

WebP

Lossy, lossless, alpha and first-frame composition.

HE

HEIC

Mobile uploads through libheif and replaceable libde265.

+4

JXL and more

JPEG XL, GIF, TIFF, BMP, PSD, ICO, TGA and PNM.

Start here

Everything in one line

The all artifact is the reliable default for services that accept user uploads. It includes every Glimt decoder and ReAI's Linux musl native bundles.

implementation("no.beint.glimt:all:0.5.0")

When size matters

Build your exact bundle

Use the AVIF or JPEGli encoder, then add only the input formats and native resize module you need.

implementation("no.beint.glimt:jpegli:0.5.0")
runtimeOnly("no.beint.glimt:jpeg:0.5.0")
runtimeOnly("no.beint.glimt:png:0.5.0")
runtimeOnly("no.beint.glimt:resize:0.5.0")

Designed for untrusted uploads

Native speed with explicit boundaries.

FFM is not a sandbox. Glimt treats limits, provenance and reproducible verification as part of the library contract.

Read the design →
01

Bound every resource

Input bytes, decoded pixels, metadata, output size, queued bytes and concurrent CPU work.

02

Keep image semantics

Apply orientation, retain alpha and supported colour profiles, and resize in user-visible coordinates.

03

Verify the supply chain

Pinned sources, checksums, sanitizer gates, clean runtimes, complete notices and no startup network access.

Small API. Serious codecs.

Keep image conversion inside your application.

Skip a shared HTTP service until scale or isolation gives you a concrete reason to add one.