I am having a similiar problem that had been posted before on the OpenACS website bulletin board "Outputing binary data on an ADP..." We are trying to pass a binary image through a variable and then display it on the adp page. Currently we can only get the bad image box to appear. We have installed ns_writebinary.
Tcl Page
set footastic [exec rrdtool graph - -a GIF DEF:vare=BMS.rrd:FIC16107:MAX LINE1:vare#ff0000:LAST]
Adp Page
<% [ns_writebinary @footastic@] %>