GUI_PNG_Draw no image shown on STM32F4 platform

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

    • GUI_PNG_Draw no image shown on STM32F4 platform

      Hello
      i try to use GUI_PNG_Draw, to print an image on STM32F429 EVAL platform, but the image doesn't appears.


      What could be the problem ? (it runs well in simulator and it runs well for *.bmp file but fails for *.jpeg also)

      thanks for any support
    • Hi,

      Do you have enough memory available for drawing PNG/JPEG file?

      The RAM requirement for PNG is:

      (xSize + 1) * ySize * 4 + 54 Kbytes

      For JPEG the RAM requirement is:

      xSize * 80 bytes + 33 Kbytes

      The memory gets allocated from the GUI_MEMORY which gets set by GUI_ALLOC_AssignMemory().

      egards,
      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.
    • Hello,
      thank you for your reply.
      In the project there is a call to GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES); with GUI_NUMBYTES = (1024) * 140;
      This memory is allocated for general use of emWin ?


      That is to say that if i want to use a 13*13 PNG file i have to allocate 14*13*4 + 54Kbytes = 56Kbytes ; so i must define GUI_NUMBYTES = (1024) * (140+56) ?

      Thanks in advance

      best regards
    • I found a bug in the emWinPng library when using ARGB color space with no Alpha setting the Alpha channel was being set to transparent.

      In the V540 version of the file:
      GUI_PNG.c line 400 change the line for assigning the Color to:
      #if (GUI_USE_ARGB)
      Color = b + ((U16)g << 8 ) + ((U32)r << 16) + ((U32)(255) << 24);
      #else