Showing results for 
Search instead for 
Did you mean: 

what software was used to convert image to HEX

Senior III

I tried just almost anything the best I get some black shape of a red button I ma trying to display. here is a top of the code from the "h"file. Does anybody recognize it. What converter to use ?

This is the original "h" file made by ST for their demo programs.

#ifndef __IMAGE_320x240_ARGB8888_H

#define __IMAGE_320x240_ARGB8888_H

#ifdef __cplusplus

extern "C" {


/* Includes ------------------------------------------------------------------*/

/* Exported types ------------------------------------------------------------*/

/* Exported constants --------------------------------------------------------*/

/* Exported macro ------------------------------------------------------------*/

/* Exported functions ------------------------------------------------------- */

const uint32_t image_320x240_argb8888[76800] =







Senior III

There is a (very vague) reference to a program called LCD image converter in one of the applications notes on how to set up the LTDC interface with an LCD display.

Some time ago I made a video on this procedure:

Look at around 32:10 in the video and see how to use the program.

I create a test image an convert it to 32-bit values. it sure looks like the values you're looking for.

PLEASE NOTE! the endianness is pretty important - Well, you'll figure it out if you do it the wrong way around 🙂

After spending a few days researching I found this program Bitmap Converter (ST) for emWin V5.32 in comes from ST in this package STemWin_Library_V1.2.0

I have to do the Alpha (I choose for image 1 and 2 the same blue button) like on the picture then I get 32 bit ARGB format like this one







and it finally worked with this code CopyBuffer((uint32_t *)blue_button, (uint32_t *)LAYER0_ADDRESS, 240, 160, 155, 50);

I only have to create bitmat image in photoshop first and then open with this program and save as C file and all the 32 bit code is inside.


I have one solved but I still cannot get this one working

BSP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)

I tried a few converters, none generated the code to display. It would be simpler if ST included instructions how it is done.

I see many people asked before me and never got answer.

Hey I saw your video a while ago when I was researching, you got the red and blue inverted. Actually I got it first inverted too when I used Bitmap Converter (ST) for emWin V5.32

I had to choose option save as red and blue inverted with alpha, then I get the code right.

You do TouchGFX it is hard to pass data from main.c to screen. How to you pass array if you want to do graph ?

I decided for now to stay with project in Keil using BSP package.

but anyway good material thanks for the video you helped a lot of people or sure.

This function seems to take bmp image format as input.

You probably have to convert your image in .bmp (win bitmap) ARGB8888.

Or RGB888 RGB565, not raw format.

yes see the option I used in photoshop 0693W000003QAGXQA4.jpg0693W000003QAGNQA4.jpgthen I open it in Bitmap Converter (ST) for emWin V5.32v and save as red and blue inverted with alpha


the right way would be to create a queue and pass an array object through that.

the fast way is to create an extern struct or similar that you can access form the model.

You will still need to go through the model->presenter->view structure.