image to 2bit array - Can't recreate. SOO Stumped.
Hi, I have been trying to figure this out for weeks. I must be over looking/over thinking something stupid simple whatever it is, I'm completely Stumped and can not move pass this.
For the weather station color sketch, you use 2 bits per pixel. thus limiting the callable colors, which is awesome. but I for the life of me can not figure out how these 2 bit per pixel arrays are being created.
I can create a single color, white on black image then use the online converter "image2cpp" set the draw mode to : (Horizontal - 1 bit per pixel) grab the array output add it to the weathericons.h change the correct headers ( bit depth, px width and height etc..) it of course won't display as the main program is set to: "int BITS_PER_PIXEL = 2; // 2^2 = 4 colors"
If I change: int "BITS_PER_PIXEL = 2; // 2^2 = 4" to BITS_PER_PIXEL = 1 My image of course displays fine and breaks all the other images in the code.
All the above make sense to me..
But HOW DO I CREATE A 2 bit per pixel image array. and i how do i ensure it uses the the predefined colors.
If i Use a 200x60px image Using only black background with white and yellow colors, what settings/program do I use to create an array that works with your minigrafx library.
If i Use image2cpp online converter and try setting draw mode to: Horizontal - 2 bytes per pixel (565) The output array no longer looks like yours and it only displays scrambled crap after uploading the code.
please help. thank you so much. Hope this makes sense. I assume I'm missing something super simple as I can't find any other topics asking this same question.
How paletted bitmaps work in general is nicely visualized e.g. here: https://learn.adafruit.com/circuitpython-display-support-using-displayio/bitmap-and-palette#palette-3025495. There's the old https://github.com/ThingPulse/esp8266-weather-station-color/issues/41#issuecomment-390497568 that might help you specifically.
THAAAANNK YOU! wish that was easier to find. you have single handedly saved my sanity.
wish that was easier to find
Would you be willing to create a PR for the README in this project describing in your own words what you would have liked to read?