STM32F746 IMAGE Widget Bitmap question

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • STM32F746 IMAGE Widget Bitmap question

    Hello.

    I use STM32F746 board with StemWin library.

    I created a menu with GUIBuilder and want to load the IMAGE widget with my picture. However I failed to do this . So I tried to separate the problem and display the picture with GUI_BMP_Draw() function. I created the picture with BmpConverter (saved it as .c file) and added it to the project. But I
    still cannot see it on the screen. I tried to put the function GUI_BMP_Draw before and after hWin = GUI_CreateDialogBox... I can see the dialog, but I cannot see the bitmap.

    Can you please point out where I am wrong?

    If more information is needed just tell me – did not want to overload the post.

    Thanks.
  • Hi,

    You have to differentiate between Bitmaps and BMP. With Bitmap we mean our internaly used image format. With BMP we are talking about bitmaps from microsoft.

    To draw a Bitmap, created with BitmapConverter, yuou have to call GUI_DrawBitmap()-

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • SEGGER - Schoenen wrote:

    Hi,

    You have to differentiate between Bitmaps and BMP. With Bitmap we mean our internaly used image format. With BMP we are talking about bitmaps from microsoft.

    To draw a Bitmap, created with BitmapConverter, yuou have to call GUI_DrawBitmap()-

    Regards,
    Sven
    Hi Sven.
    I still did not get how to show the image. I created a dialog with GUI Builder. In that dialog I put two default images. I need to replace them with my own. For example one image is a gsm strength signal so it will have 4 states. I tried to put GUI_DrawBitmap() function in different places and did not achieved the results (the bitmam to display was created by Bitmap Converter).
    Just for testing I made the following code:



    WM_HWIN CreateWindowMainDLG(void) {

    WINDOW_SetDefaultBkColor(GUI_BLUE);
    hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
    GUI_DrawBitmap(&bmGSM4, 365, 187);
    GUI_Exec();
    return hWin;
    }

    Why this code does not show the image?
    What is the format of the images used in dialog (IMAGE_CreateInderect) and how can I create my own images?
    Thank you for the support!