how to put a png or jpg image with transparency on a frame

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

    • how to put a png or jpg image with transparency on a frame

      Hello
      i want to put a png or jpg image with transparency on a frame (the backgroung of the frame can be seen through the png file)
      i tried the call to GUI_PNG_Draw after CreateFramewin call, but i can't see the picture

      GUI_PNG_Draw(pFileData, FileSize, xPos, yPos) alone works well; how can i add this png file on my frame with alpha bending ?

      thanks
      Best regards
    • Hi,

      In general you don't have to take care about anything. Only if you draw the PNG into a window and you want to see the background of the window you have to set the transparency flag for the window.

      Attached is an example. You can grab the window and move it around, it is transparent and draws a PNG.

      As far as I know there are no transparent JPEGs.

      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.