r/ComputerCraft • u/MonkeTGG • Feb 01 '26
[Tom's Peripherals] Get a screenshot of connected monitor.
I need to store the colour of a pixel, to a value, but there's no function for that (i think).
My idea, is that I can store the colour of a pixel in an image, but, I need the image to get the colour from.
How can I do this?
7
Upvotes
4
u/Exnur0 Feb 01 '26
Can you describe your overall goal a little more?
There's not generally much call to screenshot a monitor, since whatever's on screen, you have to have some representation of it in the program you're writing - that's how it ends up being displayed in the first place.
Screenshots are a thing on real computers because there are many different semi-independent pieces of software running at a time, so it makes sense to just look at what's actually being displayed. But, if there's just one piece of software, you can just capture it from that software. It's kind of like the difference between a game's "screenshot" button (in Minecraft, this is F2) and an actual OS-level screenshot with the print screen button or something like that.
Anyway, with a little more description, might be able to help. Best of luck!
3
u/Professorkatsup Feb 01 '26
Not sure how Tom's monitors work, but maybe you could have a sort of fake "screen buffer" that you edit whenever you edit the screen. By checking the buffer, you essentially check the screen. Probably. I have no idea.
though since I think Tom's monitors have some sort of texture / model / UV system built in, it wouldn't be able to read the colors of textures without having to work to read the texture in program. which is a LOT of work.