BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: CMD_LOADIMAGE png limitations.  (Read 824 times)

jipihorn

  • Newbie
  • *
  • Posts: 3
    • View Profile
CMD_LOADIMAGE png limitations.
« on: October 02, 2024, 02:37:03 PM »

Hello,

I'm using this command to decode PNG bitmap from a MCU (PIC32) into a BT812.
I had some of them that failed the decoding.
With a PNG editor, I saw, for example, that embedded ICC profiles are refused by the BT812, which is fair. As soon as I removed this chunk, the bitmap was decoded normally.
All my bitmaps are ARGB8 ones and expected to be decoded as ARGB4. And, of course, all the transfers are always 4 bytes aligned.

Now, i have a small PNG image, with nothing special that is not decoded by the BT812 and I don't know why. I tried to read/write with some drawing utilities, but it's still failing.
Here I join two bitmaps. The "One.png" fails but the other one "Two.png" is read correctly. they have the same size and same internal structure.
What are the exact requirements for PNG decoding and what is wrong with this one ?

Thanks in advance,

J.Prévost

Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: CMD_LOADIMAGE png limitations.
« Reply #1 on: October 04, 2024, 07:01:51 AM »

I tested both 1 and 2 png files on ESE 4.10 and FT813 based platform. They are working well.

See the picture enclosed.
Logged

jipihorn

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: CMD_LOADIMAGE png limitations.
« Reply #2 on: October 04, 2024, 02:14:25 PM »

Hello,

Thanks a lot to take some time to test on an other platform.

I should have some side effect with this very file, but I don't see what's the problem yet. The co-processor send a 0xFFF result from the write command register when checking for some room after the first block transfer.
By the way, for working images,  the GetProps command returns the memory address where a PNG bitmap is expanded, but the end of the buffer, not the beginning. Is it normal ? it is not what i understand when reading the BT81X programming manual. The width and heigh are right, but I didn't expect to get this memory value. I was expecting the same value than the one given to the LOADIMAGE_CMD command.

Continue investigations...

Jerome.
Logged

TFTLCDCyg

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: CMD_LOADIMAGE png limitations.
« Reply #3 on: October 04, 2024, 10:58:56 PM »

GDSTx library in teensy 4.1 (teensyduino 1.60-beta2) and NHD 5" FT813, Arduino IDE 1.8.19. Loaded from the SDIO reader using SdFat V2.2.3. The memory used is a 256Gb Canvas Go Plus microSD, formatted in exFat. The two png files appear normal

Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 780
    • View Profile
Re: CMD_LOADIMAGE png limitations.
« Reply #4 on: October 17, 2024, 09:40:23 AM »

Hi,

Could you advise which code you use to load your images and we can see if we can make any suggestions,

Best Regards, BRT Community
Logged

jipihorn

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: CMD_LOADIMAGE png limitations.
« Reply #5 on: October 21, 2024, 07:47:27 AM »

Hello,

I couldn't find any problems in the code. The original source code is mainly from the BRT_AN_025, just adapted for a PIC32. It is used on a GEN4 4.3' display.
As my original images were to large, I had to reduce them and they work now. I have a couple of dozen images and they all work. Only this one gave problems.

It is a mystery for the moment...

Jérôme.
Logged