Bitmap compression

There is an example project from team arg with experimental bitmap compression.

I would really love to see it in the next release of the arduboy lib but anyway can someone help me to generate a compressed bitmap for it?

I’ve tried the compress app in the command line but it doesn’t seem to work with png? And even if, how to i get the byte data? hexdump would by lame to copy?

1 Like

you rang my lord?

Did you try this tool to compress the images ?


Hi all,

I’m working on a RLE image compression tool (developed in java) for 1-bit images. I have started testing it and image size is reduced between 10-20% compared to Cabi encoder. Draw performance is similar but I’m working to improve it more. Hope to release a preview beta at the end of this week.

Maybe @JO3RI could be interested in work together on an “encoder/decoder standard” :wink:

1 Like

Is the decode algorithm the same as Cabi? If not, I could add the new decoder function to my Arduboy2 library once you’ve completed it.

1 Like

The decoder is different (some parts are similar). It would be great that you add this function in your Arduboy2 library, anyway I think it would be better to release a unified drawCompressed function.


Whatever works best if fine with me.


I’d be interested in an early preview… It’s something I’ve also been prototyping. My approach is more tuned to the specific requirements of the Arduboy. Perhaps you could share a Google doc for feedback? Even discussing the header might be a simple start to collaboration? I think the main wins are applying simple masking (e.g. XOR) to minimise redundant information row-to-row. Are you familiar with the PNG filters?

1 Like

Thanks for the interest! I will try to release a preview version as soon as possible.
I tested some pre-filters on test images (as PNG does) and I didn’t find any filter that improves the image in order to encode it. Do you have any sample of a 1-bit image improved with prefiltering? Thanks!

Here is a early preview of the bitmap encoder (compiled in java). You can test it before I release a stable version:

Moblynx encoder 0.2:

Syntax: java -jar encoder.jar image [array_name_prefix] [-options]

-v View decoded image
-af Encode all frames (animated gif)

Please, write me if you have any problem running the encoder. Thanks!

1 Like