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.

Thank you!

6 Likes

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).

1 Like

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.

1 Like

Interested to know more about the speed ups.

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:

1 Like

Great work! Big gains