0

I want to create a blank window in Raspbian / Raspberry Pi OS and manipulate it's pixels. Nothing more, I don't need mouse interactions, inputs, text or anything else, just a way to calculate whether a pixel at a given position is black or white. Basically I calculate big array of pixels and I want to visualize that by drawing pixels for every element of my pixel array. All I've read online so far says to use big libraries like GTK, but I don't want to use any of these.
I want to do this at the lowest possible level in C on a Raspberry Pi.
Maybe that's even possible without a complete window just in the terminal with a graphics API? Thanks
Merlin0216
  • 39
  • 1
  • 5
  • Why do you need a window to do that? Just examine the pixel array. – Weather Vane Nov 09 '20 at 15:58
  • How would I be able to visualise that pixel array without a window? (It's updated every few milliseconds) – Merlin0216 Nov 09 '20 at 15:59
  • I think the question is lacking some detail. It says you don't want to put anything in the window you create, and you need to get the colour of a given pixel. Is that already on the screen, from another process? – Weather Vane Nov 09 '20 at 16:01
  • No, I don't want to get a pixel, I want to set a pixel. I calculate an array of pixels and want visualize it. I'm sorry if that's not clear from the question, I'll try to improve it. – Merlin0216 Nov 09 '20 at 16:03
  • Possible duplicate: [Easy way to display a continuously updating image in C/Linux](https://stackoverflow.com/questions/1391314/easy-way-to-display-a-continuously-updating-image-in-c-linux) There are others to be found too. – Weather Vane Nov 09 '20 at 16:06
  • You could output a smallish array to the screen using extended characters. Alternatively you could look at the Linux frame-buffer. https://stackoverflow.com/questions/4996777/paint-pixels-to-screen-via-linux-framebuffer – Jon Guiton Nov 10 '20 at 20:58

0 Answers0