51 |
///////////////////////////////////////////////// |
///////////////////////////////////////////////// |
52 |
|
|
53 |
|
|
54 |
tntdb::Connection conn = tntdb::connect(dburl); |
tntdb::Connection conn = tntdb::connectCached(dburl); |
55 |
|
|
56 |
std::stringstream query; |
std::stringstream query; |
57 |
query << "SELECT temperature FROM ( "; |
query << "SELECT temperature FROM ( "; |
86 |
// echo the image to the browser... |
// echo the image to the browser... |
87 |
reply.setContentType("image/png"); |
reply.setContentType("image/png"); |
88 |
int size; |
int size; |
89 |
unsigned char* ptr = (unsigned char*) image.Png(&size); |
unsigned char* ptr = (unsigned char*) image.Png(&size,1); |
90 |
|
|
91 |
for (int i=0; i<size; ++i) |
for (int i=0; i<size; ++i) |
92 |
reply.out() << ptr[i]; |
reply.out() << ptr[i]; |