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? Or use some other function (not write-jpeg-to-stream) so it returns an array of octets instead of writing to the stream?
Andrew
On Wed, Sep 3, 2008 at 10:34 AM, Edi Weitz edi@agharta.de wrote:
On Wed, 3 Sep 2008 10:10:32 -0400, "Andrei Stebakov" lispercat@gmail.com wrote:
My image handlers look approximately like:
(defun image-handler () (no-cache) (setf (hunchentoot:content-type) "image/jpeg") (let ((stream (send-headers))) (with-image (new 100 100) (do-something-with-img new) (write-jpeg-to-stream stream :image new))))
You want to write binary data to this stream. See the sentence about "faithful output" here:
http://weitz.de/cl-gd/#write-jpeg-to-stream
Edi. _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel