<div dir="ltr">Does it mean that I need to get the underlying binary stream from the flexi stream returned by (send-headers) and use it with write-jpeg-to-stream?<br>Or use some other function (not write-jpeg-to-stream) so it returns an array of octets instead of writing to the stream?<br>
<br>Andrew<br><br><div class="gmail_quote">On Wed, Sep 3, 2008 at 10:34 AM, Edi Weitz <span dir="ltr"><<a href="mailto:edi@agharta.de">edi@agharta.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wed, 3 Sep 2008 10:10:32 -0400, "Andrei Stebakov" <<a href="mailto:lispercat@gmail.com">lispercat@gmail.com</a>> wrote:<br>
<br>
> My image handlers look approximately like:<br>
><br>
> (defun image-handler ()<br>
>   (no-cache)<br>
>   (setf (hunchentoot:content-type) "image/jpeg")<br>
>   (let ((stream (send-headers)))<br>
>     (with-image (new 100 100)<br>
>        (do-something-with-img new)<br>
>        (write-jpeg-to-stream stream :image new))))<br>
<br>
</div>You want to write binary data to this stream.  See the sentence about<br>
"faithful output" here:<br>
<br>
  <a href="http://weitz.de/cl-gd/#write-jpeg-to-stream" target="_blank">http://weitz.de/cl-gd/#write-jpeg-to-stream</a><br>
<font color="#888888"><br>
Edi.<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
tbnl-devel site list<br>
<a href="mailto:tbnl-devel@common-lisp.net">tbnl-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/mailman/listinfo/tbnl-devel" target="_blank">http://common-lisp.net/mailman/listinfo/tbnl-devel</a><br>
</div></div></blockquote></div><br></div>