4

There are tools like Screenshot tools, Game Macro Tools and others that can read and write pixel data directly from the visible framebuffer that is presented to the user. So there must be an API that allows one to read and possibly write directly to these arrays of pixels.

What are the APIs used to accomplish this in either Linux or Windows? Both OSes must to have some kind of systemcall to do this.

How to read the screen pixels? only gets answered by giving a huge code example with an unspecified library without explaining includes or portability (seems to be Windows Exclusive stuff).

salbeira
  • 2,375
  • 5
  • 26
  • 40
  • Possible duplicate of [How to read the screen pixels?](https://stackoverflow.com/questions/2659932/how-to-read-the-screen-pixels) – Aidan Apr 17 '19 at 15:31
  • Though it asks the same question I am explicitly asking for the OS APIs of both Linux and Windows while the linked question only gets answerd by code working on Windows with an unspecified Library. – salbeira Apr 17 '19 at 17:00
  • see [How can I access a graphics card's output directly?](https://stackoverflow.com/a/38549548/2521214) I cover OpenGL and WinAPI (VCL based encapsulation) – Spektre Apr 18 '19 at 05:02
  • 2
    This gets close but is there also a way to directly write to the screen, like displaying an "overlay" above whatever the user is currently looking at by writing directly to video memory? – salbeira Apr 20 '19 at 16:50

0 Answers0