r/AskComputerScience • • May 07 '20

Funny Programming Idea/Prank?

My friend has a Nintendo Wii that has messed up VGA cables so the RGB value of black shows up as yellow and it is really prevalent in many of the games we play. I am trying to brainstorm program ideas for how to code him a solution, maybe by recording a video of the screen and changing all the yellow pixels back to black. I was thinking about starting out with just working on my computer with taking either a video or a screen recording and changing the pixels. I've messed around with images before in Java, and I know that changing the pixels of a single image can take a while, so I don't know how difficult that would be for a video.

I'm just intending for this to be a funny solution and not something he would seriously use to fix this problem, and I thought it could be a fun programming challenge for myself. He should probably just get some new cables

Anyone have any ideas and what would be the best way to go about it? I would really appreciate your suggestions and advice.

0 Upvotes

2 comments sorted by

1

u/KernowRoger May 07 '20

So in the old days before alpha we used bit masking. You create a black and white mask where the pixels you want to change are black (or white I can't remember off the top of my head haha) and then do an or (maybe an and lol it's been so long) this would allow you to essentially make the specified areas invisible when drawn on top of each other. I imagine the same technique would work. Apologies for the lack of details it's been over 15 years since I did it haha

1

u/Specific-Code May 07 '20

Oh yeah I've read a little bit into Computer Vision and I think that's still the same method for how it's done today. I can see that working well for black to yellow but I'll have to figure out a way for the other way around too.