phoboslab / qoi

The “Quite OK Image Format” for fast, lossless image compression
MIT License
6.85k stars 327 forks source link

Java SPI implementation #210

Closed MarkJeronimus closed 1 year ago

MarkJeronimus commented 2 years ago

I made another Java implementation, an SPI implementation as a proof-of-concept.

An SPI is a Java technique with which you tell the standard library that a new file type exists, and point it to the codecs. This way any application that loads images can now load QOI images. My example program registers the SPI, then loads images using the familiar syntax:

image = ImageIO.read(new File("dice.qoi"));

instead of a call to a 3rd party function.

Next, I'm going to add an encoder SPI.

https://github.com/MarkJeronimus/qoi-java-spi

[edit] encoder done too.