Re: [racket-users] Image Transparency Detection

2016-09-10 Thread Lehi Toskin
On Saturday, September 10, 2016 at 5:45:43 AM UTC-7, Matthew Flatt wrote: > I think that means information about the source stream's alpha channel > really is not available through the current interface. A pull request > to add that would be welcome. I've been looking through bitmap%'s definition

Re: [racket-users] Image Transparency Detection

2016-09-10 Thread Matthew Flatt
At Sat, 10 Sep 2016 01:10:53 -0700 (PDT), Lehi Toskin wrote: > 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

Re: [racket-users] Image Transparency Detection

2016-09-10 Thread Lehi Toskin
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 bit

Re: [racket-users] Image Transparency Detection

2016-09-09 Thread Matthew Flatt
I don't think there's currently a way to make a loaded bitmap have an alpha channel only if the source stream has one. 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. At Fri, 9 Sep

[racket-users] Image Transparency Detection

2016-09-09 Thread Lehi Toskin
Is there a way to detect if an image has a transparency/alpha channel? I've been looking around and `(send bmp has-alpha-channel?)` really only works if `bmp` has been loaded or created specifically with an alpha channel. What I want to know is if a given path-string has such properties, not if