On Friday, September 9, 2016 at 7:45:32 PM UTC-7, Matthew Flatt wrote:
> You could use 'unknown/mask, which should create a mask bitmap only if
> the source stream has an alpha channel, but at the expense of parsing
> the file an extra time.

Running `(read-bitmap img 'unknown/mask)` produces a bitmap with a mask, but 
the problem I'm seeing is that every image, no matter the type, will return a 
mask. Images that have no alpha channel (I tested several jpegs and pngs) will 
produce an all-black bitmap of the same size as the image. It works as expected 
with images that do have alpha channels, however.

Testing it with

(define bmp (make-object bitmap% 50 50))
(send bmp load-file path-to-img 'unknown/mask)

will produce a bitmap that when running `get-loaded-mask`, always returns #f.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to