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-18 08:44 AM
I would use XnView & HxD:
It should do the trick.
2020-08-18 03:32 PM
do you mean this program https://www.xnview.com/en/
I do not see the option to choose 32 bit but you can save raw data in ARGB
there is no Menu: Image->32bits
I do not know what you mean by HxD
I am not sure if I read your instructions right.
2020-08-19 01:21 AM
Yes Xnview image viewer.
HxD: https://mh-nexus.de/en/hxd/
32 bits pixel mode should be activated as per following image, I set it to set 0xFF as default alpha value, or you'll get 0 as default, I think.
2020-08-19 08:49 AM
you must have older version this option is not available in 2.49.3, there is nothing in options, properties, view to add extra tool bar
2020-08-20 01:34 AM
It is because you have not opened an image in the editor, you are showing the browser.
You have to click File=>Open and select a picture, or select one on the left in the browser.
The 32bits option appears only when a picture is opened.
2020-08-20 07:51 AM
I did as instructed, I did the 32 bit image, then I open raw image in HxD export as C, and this is what i get
unsigned char rawData[31000] = {
0xFF, 0xFF, 0xF1, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFD, 0xFF, 0xFE,
0xFF, 0xFC, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFE, 0xFB,
0xFF, 0xFF, 0xFD, 0xFE, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xF7, 0xF8, 0xFD,
it does not look like the from ST. the ST looks like 32 bit
const uint32_t image_320x240_argb8888[76800] =
{
0xFF254888,
0xFF254888,
0xFF254888,
0xFF264989,
0xFF264989,
2020-08-20 11:07 AM
this is the code from ST examples I am trying to use,
CopyBuffer((uint32_t *)image_data_red_button, (uint32_t *)LAYER0_ADDRESS, 240, 160, 155, 50);
but maybe we can try to get this one working instead
BSP_LCD_DrawBitmap(240, 160, (uint8_t *)image_data_red_button);
SP_LCD_DrawBitmap(uint32_t Xpos, uint32_t Ypos, uint8_t *pbmp)
whatever I try to convert the image, nothing works
2020-08-21 08:05 AM
The best I am getting is black button, I cannot get color red.
I follow your instruction I get this code
[31000] = {
0xFF, 0xFF, 0xF1, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFD, 0xFF, 0xFE,
0xFF, 0xFC, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFE, 0xFB,
0xFF, 0xFF, 0xFD, 0xFE, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xF7, 0xF8, 0xFD,
I replace the original ST code with it
I use
CopyBuffer((uint32_t *)image_data_red_button, (uint32_t *)LAYER0_ADDRESS, 240, 160, 155, 50);
to dispaly and I get black button ,no color.
2020-08-24 01:36 AM
Ok, HxD doesn't output 32 bits format text, only 8bits. I thought it could do that.
I suggest to write a small C program to open the raw file and output 32bits text,
and copy result in the array.