“最佳”在JavaScript或服务器端C中生成约500个小图像的方法 [英] "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.
我想显示500个左右的小像素,例如32px X 24px-16色图像,每个在表格单元格中。每个图像(如我现在所看到的)是一个二维彩色像素数组,每个像素代表C语言CGI提供的值。
I want to display around 500 small -- say, 32px X 24px -- 16-color images, each in a table cell. Each image (as I see it now) is a 2D array of colored pixels, each representing a value furnished by C-language CGI.
最终显示的图像是辐射烛台图,每根蜡烛一个像素宽,例如: http://www.sellmycalls .com / pics / candle-sample.png
The finished, displayed image is a prmitive candlestick graph, each candle one pixel wide, something like: http://www.sellmycalls.com/pics/candle-sample.png
所有〜500张图片都希望每10秒可以重新显示一次,尽管:
All of the ~500 images want to be available for redisplay every 10 seconds, although:
- 在任何时刻,只有大约30个这些家伙出现在视口中;和
- 图像仅每隔10分钟更改一次。
我可以在服务器和客户端的任意组合。但是我需要一个一般的策略来使我入门。
I can generate the images on any combination of the server and the client. But I need a general strategy to get me started.
什么是最轻量(我希望没有巨大的JS库),最快(实现),最快(执行)和最便宜(客户端RAM)以显示这些图像?
What's the lightest-weight (no huge JS lib, I hope), quickest (implementation), fastest (execution), and cheapest (client-side RAM) to get these images displayed?
谢谢!
推荐答案
如果您问我什么是
- 最快
- 最快
- 最便宜
我对此毫无疑问:
http://code.google.com/apis/chart/
您可以委派所有脏工作
那还不错。
这篇关于“最佳”在JavaScript或服务器端C中生成约500个小图像的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!