Hi guys, Ä° have mcbstm32c kit, it has 320x240 lcd i am using keil sample projects. i need to convert bitmaps to c file.Which converter does keil use to create c header file.I found some converters but they didnt work with keil's sample projects and with them i couldnt see the right image
while(1)
i changed the image to 16 bit per pixel bitmap with a converter, and i used bitmap to c array converter, but in my lcd the images still is not true,i think i must use 16 bit per pixel c array converter like image to 16 bit per pixel bitmap converter
There is one more thing that you must do, after converting bitmap to 16 bits per pixel, you have to remove header of bitmap file, meaning you have to calculate width of picture * height * 2(bytes) and that much bytes form end of the file have to be left when you remove header. After that convert it to array, and it should work.
@milorad 1. step: convert the image to a bitmap image includes 16 bits per pixel 2. step: create the c array
you said to remove the header of the converted file.but i coulnt understand after which step i mentioned above. after 1 step or after 2. step?
for example i have an 32*32=1024 size image 1: i converted it to bitmap 16 bits per pixel 2: i converted bitmap 16 bpp to c array
the result is:
const unsigned char nj[2048] = { 0x00,0x00,0x00,0x00....... }
if you want to say remove the header after second step there is no extra; because width * height * 2(bytes)=32*32*2=2048 if you want to say after 1. step how ca i remove the header from a 16 bpp image
It is not important if it is .h or .c file, who cares. Although .c is more appropriate.
Anyways, how did you create image if you have 32 * 32 size without header?
The way it should be done is create bitmap as .bmp file, and remove header as .bmp file surely has a header and then convert it to array.