How to take screenshot of the display

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

    • Hi,

      this can be done using the function GUI_BMP_Serialize(). There's an example in the manual on how to do this under Windows:

      C Source Code

      1. static void _DrawSomething(void) {
      2. /* Draw something */
      3. GUI_DrawLine(10, 10, 100, 100);
      4. }
      5. static void _WriteByte2File(U8 Data, void * p) {
      6. U32 nWritten;
      7. WriteFile(*((HANDLE *)p), &Data, 1, &nWritten, NULL);
      8. }
      9. static void _ExportToFile(void) {
      10. HANDLE hFile = CreateFile("C:\\GUI_BMP_Serialize.bmp", GENERIC_WRITE, 0, 0,
      11. CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
      12. GUI_BMP_Serialize(_WriteByte2File, &hFile);
      13. CloseHandle(hFile);
      14. }
      15. void MainTask(void) {
      16. GUI_Init();
      17. _DrawSomething();
      18. _ExportToFile();
      19. }
      Display All
      I hope this helps. If you have anymore questions, please let me know.

      Best regards,

      Florian
      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,

      The example Florian has posted uses the Windows FS API. I suggest to use your own FS API to write to an SD card.

      Attached is an example which uses either the Windows API or our own file system emFile.

      Regards,
      Sven
      Files
      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.