GUI_SPRITE_Show() displays wrong colors

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

    • GUI_SPRITE_Show() displays wrong colors

      We are using Controller RT1051 (NXP) with Display driver UC1601.
      Therefore we choosed display driver GUIDRV_SPAGE_1C1 and color conversion GUICC_1 (NUM_BUFFERS = 1, NUM_VSCREENS = 1).

      If we now want to show a sprite with transparency, the transparency works, but the two colors of the sprite are doing wrong. On one hardware we get inverted colors, the next shows all white and the third one shows black. Each of the hardwares are programmed with the same hex-File.

      If I set breakpoint into PortAPI.pfWriteM8_A1, I can see, that there are wrong data in buffer.

      Version of emWin driver is (V5.38) (downloaded by NXP examples).


      I hope you can help me with my issue!

      Best regards

      Martin
    • Hi,

      is it possible to post your configuration files, a short application to reproduce the behavior and the sprite which should be displayed?

      I'd like to reproduce the behavior.

      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 Sven,
      I have created a short testproject for you, where the display shows black background and the sprite is drawn in the middle of the display. Attached there are also 3 pictures with 3 different prototypes which are drawing different pictures. Please note: I had to remove emWin_M4F.lib to ensure the maximum sizo of file isn't bigger than 1MB.
      Pic1 with white background (with white background there would be only a white screen) and the sprite showing in black color (transparency is shown correctly).
      Pic2 with black background and sprite is showing with inverted colors (there is also a mistake in transparency on the top half of the sprite).
      Pic3 with black background and the sprite is showing in white color (transparency liko on Pic2).

      I hope you can help me with my issue!
      Best regards,
      Martin
      Images
      • Pic1.JPG

        155.79 kB, 1,130×856, viewed 238 times
      • Pic2.JPG

        257.22 kB, 1,012×750, viewed 214 times
      • Pic3.JPG

        214.44 kB, 1,068×782, viewed 228 times
      Files
      • Test_sprite.zip

        (937.04 kB, downloaded 309 times, last: )
    • Hi,

      Thanks for the hint. There was an issue with 1bpp bitmaps and sprites which is fixed now.

      I guess you are obtaining emWin through NXP. If that's the case you might try to use a 2bpp image instead. Unfortunately, there is no better workaround I can think of...

      If you have a valid emWin license we could offer you a fix.

      Please excuse any inconvenience caused by this.

      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 Sven,
      thank you for your answer.
      We already have a emWin single product source code license but for another product...
      Is it foreseeable how long it will take that NXP will serve a version with fixed issue?
      I will try the workaround if it will work for us.
      Many thanks
      Regards,
      Martin
    • Hi,

      Unfortunately, I can't say how long it will take till NXP releases new versions of emWin.

      I have to correct myself, it's not the bitmap which causes the issue. It is the color depth. In other words, it is not possible to use Sprites with a color depth of 1bpp.

      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,

      Yes, that's why I double checked it and corrected myself.

      It's the combination of 1bpp color depth (GUICC_1) and sprites.

      If you want to use the sprite for an animation you could draw the single bitmaps one after another instead of using a sprite.

      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.