We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › proHTML, HtmlImageFinder problem
Page Index Toggle Pages: 1
proHTML, HtmlImageFinder problem (Read 505 times)
proHTML, HtmlImageFinder problem
Apr 13th, 2010, 6:11am
 
Hi,

I'm trying to load images from news web site and show them in a window at a random place.

So far the programme search the web site for images but when it can't load something it doesn't show anything detected below that one and it seems that there's always something at the top of the web site that can't be loaded so it doesn't show anything at all.

it says: Could not find a method to load

The problem seem to be with animation and video on the web site.
(.js are a big problem)

Is it possible to make him load only .jpg or to show images after the one he can load or to load everything???

Here is my code:

import prohtml.*;

HtmlImageFinder htmlImageFinder;

//insert your url here
htmlImageFinder = new HtmlImageFinder("insert website link here");
PImage[] images = new PImage[htmlImageFinder.getNumbOfImages()];
println(htmlImageFinder.getNumbOfImages());
size(800,500);

try{
 for(int i = 0;i< images.length;i++){
   images[i] = loadImage(htmlImageFinder.getImageLink(i));  

   println(htmlImageFinder.getImageLink(i));
 }



 for(int i = 0;i< images.length;i++){
   image(images[i],random(800),random(500));
 }

}

catch (NullPointerException e) {


}





Page Index Toggle Pages: 1