[plt-scheme] Re: Embedded images in planet packages

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Oct 15 15:43:39 EDT 2008

Oh, duh! Sorry. They image-snip%s, not bitmaps. This is what you want.

#lang scheme
(require htdp/world)
(require scheme/runtime-path scheme/gui)
(define-runtime-path img-path '(lib "plt.jpg" "icons"))
(define img (make-object image-snip% (make-object bitmap% img-path)))
(image-height img)


On Wed, Oct 15, 2008 at 2:38 PM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:
> Robby Findler wrote:
>>
>> bitmap%s are htdp/world images. (htdp/world image are not all bitmaps,
>> tho.)
>
> Then what am I doing wrong here?
>
> #lang scheme
> (require htdp/world)
> (require scheme/runtime-path scheme/gui)
> (define-runtime-path img-path "somegoofyimage.jpg")
> (define img (make-object bitmap% img-path))
> (image-height img)
>
> image-height: expected <image> as first argument, given: #<bitmap%>
>
> David
>
>


Posted on the users mailing list.