Re: how to create a binary output stream in SBCL
- From: Duane Rettig <duane@xxxxxxxxx>
- Date: Tue, 29 May 2007 23:19:15 -0700
Trastabuga <lispercat@xxxxxxxxx> writes:
I am trying to write an image to the stream so when I do this:
(let ((s (make-string-output-stream :element-type '(unsigned-byte
8))))
(write-jpeg-to-stream s :image my-image))
Lisp complains: #<SB-IMPL::STRING-OUTPUT-STREAM {C939499}> is not a
binary output stream.
How can I make a binary output stream?
Simple-streams (from Allegro CL, but also available to some extent on
other lisps) defines a buffer-output-simple-stream - see
http://www.franz.com/support/documentation/8.0/doc/classes/excl/buffer-output-simple-stream.htm
which is analogous to a string-stream. Also available are the
functions with-output-to-buffer and make-buffer-output-stream, linked
from that page.
--
Duane Rettig duane@xxxxxxxxx Franz Inc. http://www.franz.com/
555 12th St., Suite 1450 http://www.555citycenter.com/
Oakland, Ca. 94607 Phone: (510) 452-2000; Fax: (510) 452-0182
.
- References:
- how to create a binary output stream in SBCL
- From: Trastabuga
- how to create a binary output stream in SBCL
- Prev by Date: Re: Emacs Lisp for the Common Lisper?
- Next by Date: n accuracy
- Previous by thread: Re: how to create a binary output stream in SBCL
- Next by thread: Macro Help: 1 macro => many sexp
- Index(es):