[plt-scheme] Reading a jpeg from an internet enabled camera

From: Robert Bruce Findler (robby at cs.uchicago.edu)
Date: Fri Feb 28 10:12:28 EST 2003

Did you try getting the content as a string and display'ing the string
into a file, like this:

  (call-with-output-file "tmp.jpg" (lambda (p) (display s p)))

where s is bound to the string? Then, you should be able to open the
file using the bitmap% class or some other kind of viewer.

You can generate temporary filenames too, if only want to keep the
bitmap images in Scheme. (this is what the built-in web browser does).

Robby

At Thu, 27 Feb 2003 22:28:05 -0800, "Dan Anderson" wrote:
> ------------------------------------------------------------------------------
> Hello,
> 
> I have a student that is trying to read jpeg images from an internet
> enabled camera.  We are able to get the jpeg in "string" form but are
> unable to save it to a file in a manner that is readable by another
> program.  We can create a bitmap but are unable to view it in scheme.  If
> someone knows what we are doing wrong I would appreciate the help.  Thanks
> for your time!  (The different attempts are attached)
> 
> Dan Anderson
> Viewpoint School
> 
> 
> ------------------------------------------------------------------------------
> [application/octet-stream "ascii"]
> ------------------------------------------------------------------------------
> [application/octet-stream "savetofile"]
> ------------------------------------------------------------------------------
> [application/octet-stream "asciitofile"]



Posted on the users mailing list.