Librif - C library to encode grayscale images

Hi!

I'm happy to share librif, a C library to encode and read grayscale images. The library can encode images to raw data or in a compressed format.

I added Lua support too, unfortunately I can't test on device but I provided a Lua demo in the project.

librif-demo

Github: GitHub - risolvipro/librif: A lightweight library to encode and read grayscale images, with Playdate support. · GitHub

Thank you!

This looks amazing! What's the license on this? Is it okay if I include this as a submodule in the 3D engine I'm working on?

Thank you!

Of course you can, it has no license but I'm going to add it (probably under MIT).

Latest version includes some new features.

  • Faster read times
  • Grayscale image conversion to LCDBitmap
  • Drawing functions (position, scale, rotation)
  • Draw to screen or into another image

GitHub: GitHub - risolvipro/librif: A lightweight library to encode and read grayscale images, with Playdate support. · GitHub

I changed the memory layout for both compressed and raw images. A 4MB image is loaded in 0.62s on device, really fast. Loading times of my game are acceptable now :smiley: