[racket] reading an image from a file?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Jun 29 17:25:17 EDT 2010

There is a bitmap function for use with 2htdp/image (and htdp/image I believe.)

Jay

On Tue, Jun 29, 2010 at 3: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
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.