javl / image2cpp

GNU General Public License v3.0
529 stars 156 forks source link

Different formatting? #32

Open tablatronix opened 4 years ago

tablatronix commented 4 years ago

What do you think about allowing alternative formatting of output ? eg. binary

I personally use this for icons and stuff for example

const unsigned char bitmap[] PROGMEM = {
  B00000000,B00000000, //  . . . . . . . . . . . . . . . .
  B00000000,B00000000, //  . . . . . . . . . . . . . . . .
  B00000111,B11100000, //  . . . . . # # # # # # . . . . .
  B00011111,B11111000, //  . . . # # # # # # # # # # . . .
  B01110000,B00001110, //  . # # # . . . . . . . . # # # .
  B11100000,B00000111, //  # # # . . . . . . . . . . # # #
  B00000111,B11100000, //  . . . . . # # # # # # . . . . .
  B00011110,B01111000, //  . . . # # # # . . # # # # . . .
  B00011000,B00011000, //  . . . # # . . . . . . # # . . .
javl commented 4 years ago

Originally I made image2cpp to generate source files for use with the Adafruit Arduino graphic libraries. It has been extended to some other formats as well but I feel it has become too bloated already. At least in its current form. I'd like to support more formats, but I think the UI needs updating to accommodate this in such a way that beginners can still easily use the tool, as was the original intent. So for now I won't be adding more formats, but feel free to add it in and send me a pull request.

javl commented 1 year ago

Seeing this issue again I'm not sure why I said this would make it more bloated, as it will just add an export option. I don't really have the time (or personal need) to add this, but anyone who is interested is still welcome to send in a pull request.

This would also fix #38, which is a request to format the output such that each line matches the width of the image.