Image to const unsigned char?

Hello I'm working on a full color display project i would like to put some images on there. I mange to get some icons to show up on the screen. Below is a example sketch part where it says bitmaps.h in there is for the icons. Wondering how can i Display a image of mine. I have jpg images and png images? Is there a way to convert images into the same code?

//SemiCircle size: 50W*25H
const unsigned char semiCircle [] PROGMEM = {
0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 
0x00, 0x03, 0xff, 0xff, 0xf0, 0x00, 0x00, 
0x00, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0x00, 
0x00, 0x1f, 0x80, 0x00, 0x7e, 0x00, 0x00, 
0x00, 0x7e, 0x00, 0x00, 0x1f, 0x80, 0x00, 
0x00, 0xf8, 0x00, 0x00, 0x07, 0xc0, 0x00, 
0x01, 0xf0, 0x00, 0x00, 0x03, 0xe0, 0x00, 
0x03, 0xc0, 0x00, 0x00, 0x00, 0xf0, 0x00, 
0x07, 0x80, 0x00, 0x00, 0x00, 0x78, 0x00, 
0x07, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
0x0f, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 
0x1e, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 
0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 
0x3c, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 
0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 
0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 
0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 
0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0
};

josephchrzempiec:
Hello I'm working on a full color display project i would like to put some images on there.

Amazing, but where is 'there' ?

umm Hello I'm just trying to figure out how did they convert a image into icons like that. The one i posted came from the Adafruit GFX library.

If you save the image file as a bitmap, it's somewhat easy to extract the pixel bytes. Look up the BMP file format on common Windows API sources. Chose the lowest color depth and intensity (b/w) encoding and no RLE compression, then you may get the desired values without further conversions. In any encoding you'll have to strip the BMP header bytes from the file, which indicate the file format, number of colors, color depth, number of rows and columns etc.

Hello DrDiettrich Thank you for the information. I'm looking into doing this. I must say this is way out of reach then what I'm use to doing. But I'm learning. Again thank you i will be updating this post when i can figure out how to do the header part. The converting into black and white image i know how to do But sense this is a Color image and the LCD is full color It would be nice to keep it as a color image.

Again baby steps I will learn the header part and see where it takes me.

The data structure in your code looks monochrome to me. But there should be no problem if your library supports color bitmaps as well. Details depend on the software used to convert the image format.

Hello Drdiettrich yes that was a example one from Adafruit library i wanted to see if I can get something to post on the LCD sense it is a 3.5" color LCD screen i got from banggood. There was a site i can not find now that you can upload your image and it will convert it into the String i did it once before but lost the address to it.

Maybe there is a easy way to do this. What I'm trying to do is I have a 3.5" lcd screen on a uno board i also have a couple of Esp8266 I'm trying to make like a Digital pictureframe photos. I thought converting them into some char hex code and then putting them from the arduino to the LCD wold work. But would it be better to host the images on my website hosting and bring them form the net to display on my LCD screen?

would that be better then going through this process? And if so how can i bring them in from the net?

An image buffer in SRAM restricts the image size, or images must be transferred in multiple smaller chunks. Fixed images can be stored in PROGMEM, but variable images can deserve special memory handling, depending on their count and size (I2C RAM, SD card...).