Drawing ditmap on button

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

  • Drawing ditmap on button

    Hello,

    Is there any way to load custom BMP image via ethernet for example, without using BMP-converter and display it on button, using BUTTON_SetBitmap() function? Or display it as emWin's iconview icon?
    How can I convert raw BMP file to emWin GUI_BITMAP?

    Best regards
    Anton
  • Hello Anton,

    You can use the function BUTTON_SetBMP() to draw a BMP file directly on a button. This option is not available for the ICONVIEW widget. It is required to use emWin bitmaps to draw ICONVIEW items. These bitmaps may be stored in external memory, if required. To convert BMP files to emWin bitmaps, please use the Bitmap Converter.

    For further information about the BUTTON widget, the ICONVIEW widget and the Bitmap Converter, please refer to the chapters "Widgets" and "Bitmap Converter" in the emWin user manual.

    Best regards,
    Adrian
  • Drawing bitmap from SD card on button

    Dear Adrian,

    Please tell me how I can use BUTTON_SetBMP() to draw Window Bitmap from SD card on a button? I don't see any example about BUTTON_SetBMP() in the manual.

    Thank & Regards,
    Vu Phung
  • Hello Vu Phung,

    The function BUTTON_SetBMP() can not be used to draw a BMP image from external memory. To do so, please overwrite the callback function of the BUTTON widget and use the function GUI_BMP_DrawEx(). Detailed information on how to implement this can be found in the function description of the function GUI_BMP_DrawEx() and in the chapter "The Window Manager" in the emWin user manual.

    Best regards,
    Adrian
  • How to setup emwin bitmap address on Nor flash with KEIL MDK 4.6

    Dear Adrian,

    Thank for your reply.

    I have one more question, if You have free time, please have a look:
    - I want to store bmp file on Nor flash (emwin bmp: after convert by emwin tool) so that I can use BUTTON_SetBitmap() with emwin bmp on nor flash???

    if it's true, how can I setup linker to put emwin bmp file to the specific address on nor flash with KEIL?

    Thank & Regards,

    Vu Phung
  • SEGGER - Adrian wrote:

    Hello Vu Phung,

    The function BUTTON_SetBMP() can not be used to draw a BMP image from external memory. To do so, please overwrite the callback function of the BUTTON widget and use the function GUI_BMP_DrawEx(). Detailed information on how to implement this can be found in the function description of the function GUI_BMP_DrawEx() and in the chapter "The Window Manager" in the emWin user manual.

    Best regards,
    Adrian

    Hi Adrian
    please help me :
    I want to Drawing bitmap from SD card on button.but I can't.
    I can read bmp file from sd card.but I don't know how used form this file!
    Rds Raeisi

    The post was edited 2 times, last by SEGGER - Adrian ().

  • Hello Raeisi,

    In order to draw a BMP file from external memory, you can use the function GUI_BMP_DrawEx(). For detailed information on how to do this, please refer to the chapter "Displaying bitmap files" in the emWin user manual.

    Best regards,
    Adrian
  • Hi Adrian
    I want to set BMP for Button.
    I can display BMP with GUI_BMP_DrawEx() on screen
    :)
    ,But I can't set BMP for Button
    ?(
    .!!!!!
    :?:
    PLease help me how I can set BMP for Button?
    Thanks so much.
    Rds Raeisi

    The post was edited 1 time, last by Yraeisi ().

  • What is the procedure to convert the images and store it in SD card

    Hi,
    I want to store the BMP images (converted) into SD card and use those in my code.
    Do i have to convert each and every image one by one using BMPConverter and store the .C files in SD card ?
    or there is any Graphic resource converter tool which will create a .hex or a combined .c file which i can use for my program ?


    thanks.
  • Hello,
    store the .C files in SD card ?

    Please note that .C files need to be compiled before they can be actually used. In order to use image from an SD card, I would recommend using the emWin dta format. The Bitmap Converter can be used to convert your images to DTA files. For details, please refer to the emWin user manual.

    Best regards,
    Adrian
  • Loading a image placed in filesystem into a widget

    Hi all,

    Could you please give a sample code on How to load a bitmap(can be a jpeg or gif) into a button widget dynamically which is placed inside the file system.
    I know it's possible but couldn't get it working. I need the image on top of the widget.


    Thanks in advance
    Ajay