Hi all,<br><br>I&#39;m having trouble loading a 16x16 monochrome image such that it can be used as a cursor%.<br><br>The documentation states that using load-file with a kind of &#39;bmp always loads as colour, but it would be nice to have a new kind (perhaps &#39;monochrome-bmp) that loads monochrome images to monochrome bitmaps.<br>
<br>The documentation also states that a monochrome png will load as a monochrome bitmap%, but it seems to always load as colour (changing the bit depth from 1 to 32 during the load-file, regardless of the value specified for kind). Perhaps there&#39;s something wrong with my image file (attached) but gimp and Windows both show a 1-bit colour depth.<br>
<br>I have a work-around, in that converting the image to xbm seems to work. But I&#39;m still interested to know what I was doing wrong, anyone have any ideas?<br><br>Cheers,<br><br>Kieron.<br><br>****<br><br>#lang racket<br>
<br>(require racket/gui)<br><br>(define bm (make-object bitmap% 16 16 #t #f))<br>(printf &quot;  ~a ~a ~a ~a~n&quot; (send bm get-width) (send bm get-height) (send bm get-depth) (send bm is-color?))<br><br>(send bm load-file &quot;test-icon.png&quot; &#39;png #f #t)<br>
;(send bm load-file &quot;test-icon.xbm&quot; &#39;xbm #f #t)<br>(printf &quot;  ~a ~a ~a ~a~n&quot; (send bm get-width) (send bm get-height) (send bm get-depth) (send bm is-color?))<br><br>(define cursor (make-object cursor% bm bm 0 0))<br>
<br>