I’ve noticed there’s quite a lot of arduboy image converters (image formats to const unsigned char PROGMEM arrays), so I thought I’d make a single post listing them all as a reference.
Cabi ANSI C source code (CC0 1.0) for command line to convert PNG files to Arduboy drawCompressed() format. By @zep and @TEAMarg. Now maintained in the extras directory of the the Arduboy2 library.
Hrm, didn’t come up with any of the searches I did.
Maybe because it only uses the word ‘convert’ and not ‘converter’. Next time I’ll regex (assuming the search system supports regexes).
I even searched ‘team arg tools’ and didn’t get that page.
I’ll happily edit in any new converters if someone asks or if someone announces one,
but I don’t think anyone’s actually made any new image converters since the list was made.
Most likely it didn’t crop up during my initial search because there was never a thread announcing its existance like there has been for most of the other converters.
If it will be one converter that handles all the formats, it needs to do:
The original library drawBitmap() format.
Possibly the original library drawSlowXYBitmap() format, though there’s really no good reason to use this.
The Sprites formats, from a single image, a sprite sheet and possibly a tile sheet. Both the drawPlusMask() format, and the one used by the others, is required.
The compressed format used by the library drawCompressed() function.
Handling the Ardbitmap library format(s) would be a bonus.
Ideally it should be able to produce masks for all these formats by decoding the transparent pixels (alpha channel) in the provided images.
You also need to decide what input image formats you handle; PNG, GIF, BMP, JPEG …
Those are cool features, do any of the open source options currently available exist that can be deployed onto the site?
I don’t think we need all that to be honest, those would be nice to have.
Right now I’m looking at the team arg tool just tweaked to remove the height and width values from the array.
We could sit here and make a list but I can guarantee no developer is just going to pick up the charge and do it exactly the way we want, this post proves every is just going to do it their own way. And I’m not smart enough to do it.
If someone wants to do it I can compensate them for sure.
I’d been thinking of taking the TeamARG sprite converter, updating the HTML wrapper, and making it more gracefully handle bitmaps with a height not equal to a multiple of 8 by automatically expanding them… maybe as a project for Hacktoberfest. I got hit with the x8 bug several times recently, both in their page and the cabi converted included with the Arduboy2 library.
I think what I will do, is I will take the team argimage converter, host it up on a github, link to it from the main page, and quick links so you can get to it easy, and then also have a note on the page “if you would like to improve the functions of this converter please send pull requests”