0

So the question is: is it possible (with java), to get the pixels color, change it's value, and displaying the new color on top of the same pixel, and very importantly- in real time?

The application itself should be invisible while running, just the desired pixels are displayed in changed color.

Just want to know if it can be done with java, and if not, what is the most practical way of doing it.

Kumara
  • 117
  • 2
  • 10
  • java you can do that. check out processing.org which uses the java vm to draw pixels. – jedierikb Aug 28 '14 at 14:02
  • I don't think it can be done with it (in real time). The application itself should be invisible while running, just the desired pixels are displayed in changed color. – Kumara Aug 28 '14 at 14:11

1 Answers1

1

Yes, it is possible. For example take a look at : Java, how to draw constantly changing graphics. There I basically created a zoom tool.

Note that it differs slightly from what you are looking for as you would read pixels from topmost rendered view. You however want topmost that is not your program.

You can get program view, but it is slightly more complicated, as you need to find process that is rendering this form. I am quite sure it would be platform dependent. For example if you use Windows you need to use Win Api. But to answer you - yes it is possible.

halfer
  • 19,824
  • 17
  • 99
  • 186
Margus
  • 19,694
  • 14
  • 55
  • 103
  • Note that it is a lot easier in C#. – Margus Aug 28 '14 at 14:19
  • It wouldn't be a problem at all if the application would run only on windows. Any directions on getting a different program's/process view would of course be greatly appreciated. I just wanted to know if it can be done (if i can display colored pixels on top of whatever is currently seen on screen), before I started working on the app. I will of course post the progress. Interesting zoom tool by the way! – Kumara Aug 28 '14 at 14:39
  • In this problem it might be more efficient to solve the problem in some lower level language (ex: c++) for each platform you need to support then convert it to library/API and then call it. (I assume some of them exist already.) – Margus Aug 28 '14 at 14:50