How to capture the screen on a limited resources hardware?

Description

I am looking for ideas of performing a screen capture with the end goal of having a single image file on my computer with a copy of the TFT screen. I found various discussions here, and the blog https://blog.lvgl.io/2019-04-25/snapshots but they seems to assume resources that my STM32F401CC based system doesn’t have.

Requirements:

  • No onboard SD or any other large storage.
  • RAM is insufficient to hold an entire screen shot (I am using 320x480, 8bit colors).
  • Pixels cannot be read back from the TFT.
  • Only external connection is a USB/Serial to the compute.
  • Snapshot can be slow. That’s ok.
  • Ok to require post processing on the compute, e.g. to stitch the image shards.

What MCU/Processor/Board and compiler are you using?

STM32F401CC (256K flash, 64K RAM), ILI9488, 320x480 TFT, using 8 bit colors, parallel 16 bits interface with the TFT.

What LVGL version are you using?

The latest.

What do you want to achieve?

Publish screen shots.

What have you tried so far?

Look around for ideas. The best I have so far is invalidating current screen, instrumenting my flush cb to send each shard of the screen update over USB/Serial is some text/hex based format, and then performing post processing on the computer to stitch the shards and convert to a standard image format.

Any idea would be greatly appreciated.

Code to reproduce

Screenshot and/or video

No screenshots yet.

I would recommend using this approach. Without any onboard storage or RAM this is the only feasible solution I see.

Thanks @embeddedt, I will give it a try.

I guess I can use a library like this one https://en.wikipedia.org/wiki/Python_Imaging_Library to do the image stitching and encoding on the host, and maybe even having a python listener
that will pick the image shards from the serial stream and write a stitched image to disk. Theoretically can even capture videos.

Will see how it will go.

I was able to capture my first snapshot. 480x340, color8. The button symbol font is rendered with bpp=1. I think I should increase it to 4. Not as problematic on the TFT though.

screenshot

If anybody is interested, I can post the python program that I used to convert the hex dump to .png.

1 Like

Im interested to see you solution, please so share if possible.