Loading images from a URL

Does anyone know a good way to load images into OF from an online URL?

amazing because theo and I were just discussing this question.

I don’t think it’s completely easy, but it can be done in three ways:

a) using libcurl to get the image and save it to disk (or memory) and then read with freeImage (the PicMeme project is a good example of this)

b) using quicktime, which can load movies from URLs, so it must be able to load images as well.

c) use low level tcp to ask for the image url, by sending a request like

  
  
GET http-path-to-file\r\n\r\n  
  

d) even hackier is to use a command line program to download the image (like wget, etc) and then read the image from disk. you can call command line programs from c++ using the system command.

it’s a question we are thinking about, and we will def. be working on an answer for that soon… libCurl is pretty remarkable in what it can do, so we will be looking at wrapping it up.

take care,
zach