PNG Maker requesting

General

jicehel

3 months ago

We have a program to transform BMP, PNG, JPG to data for programs but i request another for transform in the other way from DATA to JPG.

For example:


A bitmap:

const unsigned char arduwarsLogo[] PROGMEM =
{
// width, height,
114, 16,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3e, 0x03, 0x01, 0xf1, 0xff, 0x01, 0x03, 0x3e, 0xff, 0x01,
0x01, 0x01, 0xff, 0x39, 0x39, 0x01, 0x81, 0xff, 0x01, 0x01, 0x01, 0xff, 0xf9, 0x01, 0x03, 0xff, 0x01, 0x01, 0x01, 0xff, 0xff, 0x01, 0x01, 0x01, 0xff, 0x00, 0x3f, 0xe1, 0x01, 0x01, 0xff,
0x01, 0x81, 0x01, 0xff, 0x01, 0x01, 0xe1, 0xff, 0x3e, 0x03, 0x01, 0xf1, 0xff, 0x01, 0x03, 0x3e, 0xff, 0x01, 0x01, 0x01, 0xff, 0x39, 0x39, 0x01, 0x81, 0xff, 0xc3, 0x81, 0x01, 0x3f, 0x21,
0xe1, 0xa3, 0x3e, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x20, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x87, 0x80, 0x80, 0xf8, 0x1f, 0x13, 0xf0, 0x80, 0x80, 0xff, 0x80,
0x80, 0x80, 0xff, 0xf8, 0x80, 0x80, 0x9f, 0xff, 0x80, 0x80, 0x80, 0xff, 0x9f, 0x80, 0xc0, 0x7f, 0x60, 0xc0, 0x80, 0x9f, 0x9f, 0x80, 0xc0, 0x60, 0x3f, 0x00, 0x00, 0x7f, 0xc0, 0x80, 0x80,
0xe0, 0x3f, 0xe0, 0x80, 0x80, 0xc0, 0xff, 0x87, 0x80, 0x80, 0xf8, 0x1f, 0x13, 0xf0, 0x80, 0x80, 0xff, 0x80, 0x80, 0x80, 0xff, 0xf8, 0x80, 0x80, 0x9f, 0xfc, 0xc4, 0x87, 0x86, 0xfc, 0x80,
0x80, 0xc1, 0x7f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0x01, 0x20, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x08,
};


or an image

const uint16_t Personnage_marche_bas_anim1x8Data[] = {8,8,1, 1, 0xf80d,0, 0xf80d,0xf80d,0xa8a3,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0x4439,0x210,0x210,0x210,0xf80d,0xf80d,0xf80d,0x210,0x4439,0x4439,0x4439,0x210,0x210,0xf80d,0xacd0,0xffff,0xfd42,0xfd42,0xfd42,0xa8a3,0xffff,0xacd0,0xffff,0xacd0,0xfd42,0xf720,0xfd42,0xfd42,0xacd0,0xffff,0xfeb2,0xf80d,0xfd42,0xf720,0xfd42,0xfd42,0xf80d,0xfeb2,0xf80d,0xf80d,0xf80d,0xfeb2,0xcc68,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d,0xf80d}; 
Image Marche_bas1 = Image(Personnage_marche_bas_anim1x8Data);


or a another bitmap

const byte gamelogo[]=
{
  64,26,
 B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
 B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
 B00111011,B10011101,B11011100,B01110001,B11110001,B11111011,B11100001,B11110000,
 B00111011,B10011101,B11011100,B11111001,B11111001,B11111011,B11110011,B11111000,
 B00111011,B10011101,B11011100,B11111001,B11111001,B11111011,B11111011,B11111000,
 B00111011,B11011101,B11011101,B11111101,B11111101,B11000011,B10111011,B10111000,
 B00111011,B11011101,B11011101,B11111101,B11011101,B11000011,B10111011,B10111000,
 B00111011,B11011101,B11011101,B11011101,B11011101,B11000011,B10111011,B10000000,
 B00111011,B11111101,B11011101,B11011101,B11011101,B11110011,B10111011,B11000000,
 B00111011,B11111101,B11011101,B11011101,B11011101,B11110011,B11110001,B11100000,
 B00111011,B11111101,B11011101,B11111101,B11011101,B11110011,B11100000,B11110000,
 B00111011,B11111101,B11011101,B11111101,B11011101,B11000011,B11110000,B01111000,
 B00111011,B10111101,B11011101,B11111101,B11011101,B11000011,B10111000,B00111000,
 B00111011,B10111101,B11011101,B11011101,B11011101,B11000011,B10111011,B10111000,
 B00111011,B10111101,B11111101,B11011101,B11011101,B11000011,B10111011,B10111000,
 B00111011,B10011100,B11111001,B11011101,B11111001,B11111011,B10111011,B11111000,
 B00111011,B10011100,B01110001,B11011101,B11111001,B11111011,B10111011,B11111000,
 B00111011,B10011100,B00100001,B11011101,B11110001,B11111011,B10111001,B11110000,
 B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
 B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
 B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
 B10100110,B11000110,B01101010,B11101100,B11100110,B01101110,B01100110,B11001110,
 B10101010,B10101010,B10001010,B01001010,B10001010,B10101010,B10001010,B10101000,
 B10101010,B10101110,B11101010,B01001010,B11001010,B11101100,B10001110,B10101100,
 B01001010,B10101010,B00101010,B01001010,B10001010,B10101010,B10001010,B10101000,
 B01001110,B11001010,B11100100,B11101100,B11101110,B10101010,B11101010,B11001110,
};


or a last: an array of bitmaps

const byte invader[8][7] = {
  {8,5, B00111000,B11010110,B11111110,B00101000,B11000110},
  {8,5, B00111000,B11010110,B11111110,B01000100,B00101000},
  {8,5, B00010000,B10111010,B11010110,B01111100,B00101000},
  {8,5, B00111000,B01010100,B11111110,B10010010,B00101000},
  {8,5, B00111000,B01010100,B01111100,B01000100,B00101000},
  {8,5, B00111000,B01010100,B01111100,B00101000,B01010100},
  {8,5, B01010100,B10000010,B01010100,B10000010,B01010100},
  {8,5, B01010100,B10000010,B01010100,B10000010,B01010100},
};


Someone think he can do that ? Could be usefull for conversion of old data included in a program (Gamebuino Legacy, Arduboy, etc...) into a new remake of game on META or to works again on an old prog if you don't have the assets anymore.

deeph

NEW 3 months ago

For 1-bit bitmaps (monochrome), I use this neat program : Paintuino ☺

jicehel

NEW 3 months ago

Cool this tool  ;)  Yes it's answer for 1 bit bitmaps. I like the page too with his cool tools. If you know some cool tools like this, you can put them in a discussion. It's make life easier :)  Thanks Deeph

jicehel

NEW 3 months ago

deeph, just a thing about Paintuino, when i have a black and white picture and i convert it, it's invert black and white (white => black and black => white). Is it normal ? (it's not a big problem, i'll invert source, just askin if it's me who make error or if it's normal)

deeph

NEW 3 months ago

Hmm I don't know, it's working for me. What do you call a black & white picture ? 1-bpp bmp ?

jicehel

NEW 3 months ago

No the one used was a png but it's fine with autoconvert picture. It's good on screen but when i use Paintuino, the white parts become black and the black parts become white. The program is cool anyway. I have just to invert my source picture but as it's don't make it for you it's what i had supposed: it's probably me who make an error in use of the program but i don't see wich ?  (You think it's because source is PNG in input ?)

deeph

NEW 3 months ago

I tried with a png too and it works as it should (at least with windows 10).

Is it the preview picture (in Paintuino) or the rendered image on the Gamebuino that is inverted ? Is the binary code inverted too ?

jicehel

NEW 3 months ago

The rendered imae. The preview works fine but white is coded as 1 and black as 0 so when showed in program 1 make it black and 0 => white

deeph

NEW 3 months ago

Ok, it's strange because it's working fine on my side... Anyway if inverting the source file isn't a problem, it'll do the job.

Btw, what are you working on ? A port of a Gamebuino classic game ?

jicehel

NEW 3 months ago

No, i have decide to follow an first game from someone (Agent6) from Arduboy and to adapt it as he progress on his game (Ardubike).

He have accept it and it's a good exercice for me as i don't have alot of time, it a long challenge. It's make me not too much works but it's make me thinking a few to keep me busy when i have time  ;) 

I have start it before seeing the creation of Outrace because this game open alot of door for me and it's the type of game i dream to play in multiplayers (with wifi, bluetooth or other)  and why not be able to play between a Gamebuino classic or Makerbuino, a meta and / or an Arduboy (there is Pokito too or other console but i can't follow all of them ;) ). I don't have amebuino classic so i don't have idea if it's could be easy to plug a communication device as it is on Makerbuino, Arduboy or Meta but it's can be done, i think

Sorunome

3 months ago

The Makerbuino is identical hardware-wise to the Gamebuino Classic, everything is 100% compatible.

Sorunome

NEW 3 months ago

jicehel jicehel

The Makerbuino is identical hardware-wise to the Gamebuino Classic, everything is 100% compatible.

jicehel

NEW 3 months ago

Just a little picture of Agent6 animation of the bike ported on the META to answer to deeph

Aurélien Rodot

3 months ago

Jicehel it's because the META defaults to black background, while the META used to default to white background (because one screen is black and the other is white). You have to use gb.display.setColor(BLACK,WHITE); to change the colors

Aurélien Rodot

NEW 3 months ago

jicehel jicehel

Jicehel it's because the META defaults to black background, while the META used to default to white background (because one screen is black and the other is white). You have to use gb.display.setColor(BLACK,WHITE); to change the colors

jicehel

NEW 3 months ago

OK, thanks Aurélien. So yes it logical. 

You must be logged in in order to post a message on the forum

Log in