SRL Archive - Java Help and Tutorials

How would I create a buffered image of my applet?


chandlerethan

2012-01-07 14:59:42

Ok so I'm trying to figure out how to take a virtual screenshot of my RS Loader (applet) so that I can see the image, even when it's minimized (like S.M.A.R.T. does) but I'm coming up empty-handed on ideas. Any suggestions from more advanced programmers?

ShawnjohnSJ

2012-01-07 15:05:45

I can't help you with this because I've never had to work with taking screenshots, but I just want to say that I don't think its possible to take a picture of the applet while its minimized in pure java, you might have to use JNI.. someone correct me if I'm wrong.

Richard

2012-01-08 20:09:04

From: ShawnjohnSJ
I can't help you with this because I've never had to work with taking screenshots, but I just want to say that I don't think its possible to take a picture of the applet while its minimized in pure java, you might have to use JNI.. someone correct me if I'm wrong.


I don't think that's entirely true. I've been looking through the source of RSBot, and there was a method to capture a screenshot, so I know it's not impossible. I don't know if it would be awfully efficient though, when you think about the number of pixels being handled to make the image, then any methods to cycle through all the pixels. I had the idea of images in different areas (MS, MM, INV, Chat), so it would be dealing with far less data. If you'd like to look into how RSBot dealt with it, I've got the source for the screenshot utility here, you can cycle through the rest of repository to find any other bits that you might find useful.

ShawnjohnSJ

2012-01-08 20:22:26

From: Richard
I don't think that's entirely true. I've been looking through the source of RSBot, and there was a method to capture a screenshot, so I know it's not impossible. I don't know if it would be awfully efficient though, when you think about the number of pixels being handled to make the image, then any methods to cycle through all the pixels. I had the idea of images in different areas (MS, MM, INV, Chat), so it would be dealing with far less data. If you'd like to look into how RSBot dealt with it, I've got the source for the screenshot utility here, you can cycle through the rest of repository to find any other bits that you might find useful.


Thanks for correcting me. Good to know its possible.

Richard

2012-01-08 20:29:31

From: ShawnjohnSJ
Thanks for correcting me. Good to know its possible.


I haven't proven you wrong just yet :p I've yet to actually figure out how to do so…

ShawnjohnSJ

2012-01-08 20:44:02

Well, RSBot takes screenshots while minimized right? If so that pretty much proves me wrong. :P

dwimage

2013-06-06 22:50:20

don't know about that, but you may be wrong