Am 29.12.2013 10:06, schrieb Olaf Radicke:
Hi Carsten,
...
...on this site:
http://www.tntnet.org/howto/static-howto.html
greetings,
Olaf
(munich, germany)
Hi,
yes, the static howto is a good place to start.
To recap, what you need:
reply.setContentType(std::string)
sets the content type. The method
reply.out()
returns a reference to a std::ostream, where you write your data into.
So the shortest possible code is here:
<%cpp>
reply.setContentType("image/jpeg");
reply.out() << generateImageData();
</%cpp>
As a alternative you have a class, which generates the image data in the
output operator for std::ostream. But I'm sure that you know how to do that.
One side note: you have to be careful with empty lines. You have to make
sure, your ecpp do not contain any empty lines outside the <%cpp>
section since it is written to the output stream and may corrupt your
image. But as a special feature of ecpp one line feed after the end tag
</%cpp> is not sent to the output stream.
Tommi
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general