8

Is there some reasonably cross platform way to create a thumbnail image given a URL? I know there are thumbnail web services that will do this, but I want a piece of software or library that will do this locally. I guess in Linux I could always spawn a browser window using a headless X server, but what about Windows or OS X?

Jeff Atwood
  • 60,897
  • 45
  • 146
  • 152
Knut Eldhuset
  • 1,789
  • 3
  • 16
  • 18

3 Answers3

3

You can use Firefox or XULRunner with some fairly simple XUL to create thumbnails as PNG dataURLs (that you could then write to file if needed). Robert O'Callahan has some excellent information on it here:

http://weblogs.mozillazine.org/roc/archives/2005/05/rendering_web_p.html

Joel Anair
  • 13,248
  • 3
  • 28
  • 35
  • 1
    @Bazi it works for me. Can you double check? Of course, this is why links alone are not good answers, but I didn't really know that in September 2008. – Joel Anair Jan 10 '17 at 19:56
2

I know you said you want the service to be local, but... if you have to be connected to the Internet to take the screenshot, you should equally have access to a web service. It seems like a better move to do this than to open yourself up to cross-platform issues of taking screenshots locally.

1

There are a number of commercial packages that will do what you want. I'm not sure from reading your question if free is a requirement. But here are some applications I've found that are reasonably priced and which do exactly what you want. I have not used them myself, but they have free trial downloads so you can evaluate before you purchase.

Michael Ridley
  • 9,960
  • 3
  • 20
  • 16