[racket] reading an image from a file?

From: Mitchell Wand (wand at ccs.neu.edu)
Date: Tue Jun 29 17:43:15 EDT 2010

OK, bitmap is what I was looking for.  Thanks.  --Mitch

On Tue, Jun 29, 2010 at 5:28 PM, Robby Findler
<robby at eecs.northwestern.edu>wrote:

> If you use File|Insert image... you end up getting an image-snip<%>
> object. It is a wrapper around a bitmap% object that connects to our
> editor classes. A bitmap% object is the raw bits plus a little bit of
> information about it.
>
> Probably you just want to use 2htdp/image's 'bitmap' function, tho.
> (Or maybe htdp/image's).
>
> Robby
>
> On Tue, Jun 29, 2010 at 4:22 PM, Mitchell Wand <wand at ccs.neu.edu> wrote:
> > Silly question: How can I read a file and treat its contents as an image?
> > eg, I'd like to say something like:
> >
> > (define cat-image (read-image "cat-image.png"))
> >
> > The immediate advantage of doing this, rather than Insert|Image is that I
> > can keep my .rkt file in text form, so I can use other tools on it.  And
> of
> > course if I want to find an image dynamically I need something like this.
> >
> > I can't even see what datatype a value defined by Insert|Image is.
> >
> > --Mitch
> >
> >
> >
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/users
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100629/f1c32fe0/attachment.html>

Posted on the users mailing list.