Monday 7 December 2009

Around the world!

After speaking to some people on the Processing website, asking if I could stream live feeds from the internet, they said no - but only to movie files, not jpegs that refresh every couple of seconds on the web page. I just had to write a simple programme that tells processing to look for the exact picture - simple! It's not the smoothest thing in the world, but it works. The best feed I could find so far is from the Brooklyn Bridge that refreshes the picture every second. To view it just copy & paste this code into a processing application:

PImage a; // Declare variable "a" of type PImage

void setup() {
frameRate(1);
size(1024, 768);
}

void draw() {
// Displays the image at its actual size at point (0,0)
a = loadImage("http://brooklyn-bridge.mobotixcam.de/record/current.jpg?rand=380424");
image(a, 0, 0);


}

No comments:

Post a Comment