[racket] monochrome bitmaps

From: Harry Spier (vasishtha.spier at gmail.com)
Date: Wed Oct 31 23:06:39 EDT 2012

Dear list members,

I see from the Racket Drawing Toolkit documentation that there are
monochrome bitmaps but I'm not clear from the documentation how to
access and manipulate these monochrome bitmaps.

Specifically:
1) If I load a bitmap with a greyscale image file using the form:
       (make-object bitmap%	 	
            in ;path to monochrome image files 	 	 	
 	 [ kind	 	 	 	
 	   bg-color	 	 	 	
 	 complain-on-failure?])	

Will that create a monochrome bitmap from  the greyscale image?  If
not is there another way to load a file as a monochrome bitmap?

2) How do I access pixel intensities from a monochrome bitmap?
The documentation for get-argb-pixels says it copies rgb values plus
alpha channel into pixels.  For a monochrome bitmap is it the alpha
channel which holds the pixel intensity where 1 is black and 0 is
white?

Thanks,
Harry Spier

Posted on the users mailing list.