[plt-scheme] Embedded images in planet packages

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Oct 15 07:31:26 EDT 2008

This is a shortcoming in our compiler, I'm sorry to say. If you want
to use images in planet packages, I think the best thing I can offer
you now is to use define-runtime-path to point to the image and then
(make-object bitmap% ....), which gives you the same kind of a value
as the embedded image would, but without embedding it.

Robby

On Tue, Oct 14, 2008 at 8:50 PM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:
> I can't seem to install a planet package that has an image embedded in the
> source code (via Insert Image).  When I try to inject the package, I get:
>
> write: cannot marshal constant that is embedded in compiled code:
> #(struct:object:image% ...)
>
> Any idea on how to work around this?  Should this be considered a bug?
>
> David
>
> How to recreate in 4.1.1.3-svn14oct2008:
>
> planet create img/
> planet fileinject dvanhorn img.plt 1 0
>
> ;; ------------
> ;; img/main.ss
> #lang scheme
> (provide img)
> (define img #|INSERTIMAGE|#) ;; eg, http://plt-scheme.org/logo.png
>
> ;; -------------
> ;; img/info.ss
> #lang setup/infotab
> (define name "Embedded image test.")
> (define categories '(misc))
> (define required-core-version "4.1.0")
> (define repositories (list "4.x"))
> (define primary-file '("main.ss"))
> (define blurb (list '(div "Just an embedded image.")))
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>


Posted on the users mailing list.