Loading bitmap into button from filesystem

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

  • Loading bitmap into button from filesystem

    Hi,

    Could you please give a sample code to load a bitmap into a button widget dynamically which is placed inside the file system.
    I know it's possible but couldn't get it working.

    Thanks in advance
    Ajay
  • Hi Ajay,

    attached is a sample which loads a BMP file via the window file system. This is for the simulation but should be easily adapted to run on HW with another FS.
    Also, you can do this for other formats like JPEG, GIF or PNG. For using PNG you need the additional PNG library which can be downloaded here:
    segger.com/link/emwin_png.zip

    Make sure the path in '_acFileName[]' points to the BMP.

    Regards,
    Sven
    Files
    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.