PNG display graphic issue using GUI_PNG_Draw function

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

    • PNG display graphic issue using GUI_PNG_Draw function

      Hi,
      I have a .png image, converted to .c using Bin2C.exe tool.
      I used GUI_PNG_Draw function to display the icon on screen.
      The icon was displayed with missing pixels or some shift I don't know exactly what is the issue.

      Important to note, that I tried displaying the same image using GUI_DrawBitmap using Bitmap Converter and the icon was displayed perfectly!
      Also, its a must for me to use PNG and not bitmap bmp image.

      I attached the result of displaying the PNG using GUI_PNG_Draw also the result of diplaying the same PNG image converted to bitmap BMP using GUI_DrawBitmap.
      Attached also the original PN image.

      The post was edited 2 times, last by Sysmop226 ().

    • Hi,

      does this also happen with other PNGs?

      Is it possible to send me the converted PNG (the output of Bin2C.exe)?

      I could reproduce any issue.

      Your configurations files might be of interest, too (GUIConf.c/.h, LCDConf.c/.h).

      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.
    • Hi, thanks for the reply.
      I tried also to convert the png to bmp (binary not bitmap) and used GUI_BMP_Draw, its also not good.
      - does this also happen with other PNGs?
      Yes, but different display issues (for example, I tried to display a logo, and it was dispalyed with different colors does not match the origin). and ofcourse when displaying the same logo using bitmap it works fine.

      attached the .c file og the PNG image created by Bin2C.exe (attached it as .txt file).

      I'm not sure I can attach the configuration files. The same config files works fine when using GUI_DrawBitmap.
      Files

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

    • Hi,

      It is working on my end.

      Which color conversion are you using?
      Which driver are you using?
      How much memory did you spend emWin?

      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.
    • Hi,

      I checked it with almost the same settings as you have, but everything looks good.

      Which emWin version are you using?
      Does the PNG library version mathes the emWin version?

      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.
    • Hi,
      STemWin526_CM4_OS_IAR.
      Also, I downloaded emwin_png library and added V526 to my project.
      The strange thing is that the bitmap option works fine. (I don't think its specificly a PNG issue because also GUI_BMP_Draw does not work fine with these configurations).
    • Hi,


      Sysmop226 wrote:

      I don't think its specificly a PNG issue because also GUI_BMP_Draw does not work fine with these configurations
      You are right. This seems a bit strange.

      Do you place the converted PNG (the c-array) on an external memory?
      Maybe it is an issue with the memory.

      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.
    • Hi,
      When I use BITMAP array it's also placed on the external memory.
      Displaying the Bitmap has no issues.

      But I also thought that this might be a problem of memory, so I placed the C-array on the internal Flash.

      I attached another interested "bad" image display (you can see the difference between the BITMAP display and the PNG I attached both).
      The PNG again is converted via Bin2C.exe
      Attached also the .C files for both the BIN2C and BITMAP.
      Images
      • BitMapConverted_GUI_DrawBitmap2.jpg

        180.22 kB, 1,600×1,069, viewed 519 times
      • PNG_Bin2C_GUI_PNG_DRAW2.jpg

        164.19 kB, 1,600×1,036, viewed 509 times
      Files
      • BIN2C.txt

        (48.59 kB, downloaded 533 times, last: )
      • BITMAP.txt

        (121.96 kB, downloaded 548 times, last: )