[hunchentoot-devel] Re: utf-8 encoding problems

Edi Weitz edi at agharta.de
Wed Sep 3 14:34:53 UTC 2008


On Wed, 3 Sep 2008 10:10:32 -0400, "Andrei Stebakov" <lispercat at 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.



More information about the Tbnl-devel mailing list