Jump to content

getBufferedImage()


Recommended Posts

Posted

Well basically I need to store data of interfaces.

 

The problem is that it's too slow and the interface is gone by the time it actually 'shoots' the image. Which leaves me with a screenshot of nothing useful. 

 

ImageIO.write(ctx.getColorPicker().getBufferedImage(), "JPG", new File(System.getProperty("user.home") + "\\OSBot\\Data\\screenshots\\" + i.getId() + ".jpg"))){

 

 

So next thing what came up in my mind was to get the widgets of the interface, which was pretty useless since the parts I'd need from the interface couldn't be stored.

 

And yes, I know the code only works for windows.

Posted (edited)

Which widget/data do you need?

 

Clue map data

 

i was thinking if I could find specific patterns in the map I could figure out which map is the right one with corresponding id. However, that is not needed at all if I could screenshot the map.

Edited by Psvxe
Posted

Clue map data

 

i was thinking if I could find specific patterns in the map I could figure out which map is the right one with corresponding id. However, that is not needed at all if I could screenshot the map.

 

But... you basically have full control over the visibility of that interface, just don't close it until your screenshot is ready :p

Posted

How are you checking if the image was written?

Also why do you need to write it at all in the first place ? Oo

return if dir contains screenshot file.

Well, I'm writing up a cluesolver. However, I don't have the right tiles for every clue id. This is way I need to gather the id's and figure out the 'clue'.

Posted

return if dir contains screenshot file.

Well, I'm writing up a cluesolver. However, I don't have the right tiles for every clue id. This is way I need to gather the id's and figure out the 'clue'.

 

Your dir checking might be the issue.

I know why you want to analyze the image, but why do you need to write it to disk for that?

Posted

My question isn't "why are you analyzing the image?" but rather: "why are you writing the image to the disk (ImageIO.write) to analyze it?".

Well, so I could automatic gather information overnight and analyze by the next day.

Is the question now answered? Don't really get it. Is there a different or better way to do it? O.o

Posted

Well, so I could automatic gather information overnight and analyze by the next day.

Is the question now answered? Don't really get it. Is there a different or better way to do it? O.o

 

Image comparison algorithms rarely if ever require you to store the image on disk :p

 

You do realize that there are more than 450 different clues right? Most of them visually very similar too. Even if you are just doing one tier, say easy clues, then you better come up with a really efficient algorithm :p

 

If you are just capturing images to be able to statically link a scroll ID to a specific clue, I really wouldn't recommend doing that, Jagex could break your script in less than 10 seconds (this actually happened last year-ish).

 

Image comparison for maps + OCR for text-based clues = thumbs up.

Posted

Image comparison algorithms rarely if ever require you to store the image on disk tongue.png

 

You do realize that there are more than 450 different clues right? Most of them visually very similar too. Even if you are just doing one tier, say easy clues, then you better come up with a really efficient algorithm tongue.png

 

If you are just capturing images to be able to statically link a scroll ID to a specific clue, I really wouldn't recommend doing that, Jagex could break your script in less than 10 seconds (this actually happened last year-ish).

 

Image comparison for maps + OCR for text-based clues = thumbs up.

Well, I was thinking of grabbing the text messages from a clue and have them compared with the widget text of clue. Then I could search up the right id and have them linked. You get me? haha

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...