|
This is just a small example to show how you can make a ScreenShot.
screeenshot and graphical programming for RPI: 10_gp_02.zip
boot with test-files for RPI: 05_boot.zip
The unit "rgraphics.pas" includes all important functions around the TBitmap. The function "LoadFromFile" reads a bitmap from the SD-Card and and stores the result in a MemoryStream. This MemoryStream can be copied to the framebuffer with the function "FramebufferConsoleDrawStream" or "FramebufferConsoleDrawTransStream".
With the function "SaveToFile" can a MemoryStream stored to a bitmap-file on the SD-Card.
In this version of the unit "rgraphics.pas" can only read and write bitmaps with 24-bit color depth.
The MemoryStream is ever in the same format as the content of the framebuffer (32-bit AGBR).
For the development of these new unit is a lazarus project on windows with debugger very helpful. It shows loging information and the imported bitmap.
Test-Project Lazarus for Windows for unit "rgraphics.pas": 50_Lazarus_Win32_RGraphics.zip