[plt-scheme] pickling a bitmap%

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jun 1 18:04:22 EDT 2006

At Thu, 01 Jun 2006 16:48:06 -0400, David Richards wrote:
> (define _bitmap (send _image-snip get-bitmap))
> ; now try to 'release' the bitmap from the image-snip, so it can be 
> used by bitmap-dc
> (send _image-snip set-bitmap (make-object bitmap% 1 1 #f) #f)

Instead of trying to release a bitmap, I would normally copy it to
another bitmap (using `draw-bitmap'). Having to copy the bitmap is not
great, but it's probably better than going through a file.

Internally, there's a notion of "read-only dc<%>" that can access a
bitmap that's attached elsewhere. I should probably expose this in the
MrEd toolbox.


Posted on the users mailing list.