2020-08-18 05:35 AM
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" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
const uint32_t image_320x240_argb8888[76800] =
{
0xFF254888,
0xFF254888,
0xFF254888,
0xFF264989,
0xFF264989,
2020-08-24 02:24 AM
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: https://www.youtube.com/watch?v=GxUpMrnIwpo
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 :)
2020-08-24 07:23 AM
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
{
0xFF254888,
0xFF254888,
0xFF254888,
0xFF264989,
0xFF264989,
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.
2020-08-24 07:31 AM
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.
2020-08-24 07:44 AM
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.
2020-08-24 07:47 AM
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.
2020-08-24 07:53 AM
yes see the option I used in photoshop then I open it in Bitmap Converter (ST) for emWin V5.32v and save as red and blue inverted with alpha
2020-08-24 10:56 AM
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.