I have this tag in one website I found
<input type="button" value="Save Result As PNG">
When I click on it, it downloads an image automatically. I´m trying to create a code that can make java "click" or perform the input action, so I can get all the images I want, but I don´t know where to start, or how to do it.
I also tried to download the image alone using this code
link:how to download image from any web page in java
URL url = new URL("http://www.yahoo.com/image_to_read.jpg");
InputStream in = new BufferedInputStream(url.openStream());
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buf = new byte[1024];
int n = 0;
while (-1!=(n=in.read(buf)))
{
out.write(buf, 0, n);
}
out.close();
in.close();
byte[] response = out.toByteArray();
but it didn´t work as well.
The site I´m trying to download the files is: https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Generator/
Thank you very much!