Thanks for the info, Matthew.<br><br>In looking at the docs again, I see now something that I should have noticed earlier, that the arguments to set-argb-pixels include a bytes?, and that should have been sufficient for me to answer my own question. Sorry for the noise. <br>
<br><div class="gmail_quote">On Thu, Sep 13, 2012 at 9:07 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">At Mon, 10 Sep 2012 13:00:55 -0700, Danny Yoo wrote:<br>
> Hmm. Something VERY strange is happening with the alphas being<br>
> produced by ico->argb vs the alphas expected by the bitmap functions.<br>
> They seem... flipped!<br>
<br>
</div>The problem seems to be in `argb->bitmap' from<br>
`mrlib/cache-image-snip'. That function creates and old style<br>
bitmap+mask combination (insteda of a bitmap with an alpha channel),<br>
and it uses "alpha" values as mask values (instead of inverting an<br>
alpha value to arrive at a mask).<br>
<br>
Here's a version of `ico->bitmap' that uses `racket/draw' directly and<br>
creates a bitmap with an alpha channel:<br>
<br>
(define (ico->bitmap ico)<br>
(define w (ico-width ico))<br>
(define h (ico-height ico))<br>
(define bm (make-bitmap w h))<br>
(send bm set-argb-pixels 0 0 w h (ico->argb ico))<br>
bm)<br>
<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br>