Skip to content Skip to sidebar Skip to footer

"best" Way To Generate ~500 Smallish Images, Either In Javascript Or Server-side C

This is my very first attempt at generating images on the fly. I want to display around 500 small -- say, 32px X 24px -- 16-color images, each in a table cell. Each image (as I see

Solution 1:

If you ask me what is the

  • fastest
  • quickest
  • cheapest

I have no dubt about it:

http://code.google.com/apis/chart/

You can delegate all the dirty job to google' server.

And that's not bad at all.

Solution 2:

Another option should be to simply use Canvas. Simply draw each candle onto the canvas according to to the values generated by your C CGI. You can fetch those values through a simple AJAX call into the client.

No JS library required. The canvas API is trivial, a few lines of code will generate your images. It should execute fast enough so that the user won't even notice they are generated dynamically (that is 30 images / viewport). And it is not much more expensive than displaying static images for the client RAM and also will not produce any additional load on your server.

Post a Comment for ""best" Way To Generate ~500 Smallish Images, Either In Javascript Or Server-side C"