[17:22:50] <mikeybisbo> if i load them and save them as a png straight away the transparent parts are black
[17:23:05] <wiredfool1> the first one has 9 different icons in it. only the last 3 of them have an alpha layer
[17:25:22] <mikeybisbo> hmm interesting - is there a way to specify which of the icons to load in pil?
[17:29:24] <mikeybisbo> I'd actually settle with being able to render the transparency onto white instead, and then I'd be able to use the RGB values
[17:31:40] <wiredfool1> so, the ico file support changed dramatically around 5/2013, doesn't look like bmp file info has changed lately.
[17:31:51] <wiredfool1> (icos are containers for bmp and png files)
[17:32:41] <wiredfool1> we support the first 3 bmp formats in this table: https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.28bitmap_information_header.29
[17:33:01] <wiredfool1> which doesn't look like it includes alpha channel support
[17:36:01] <wiredfool1> Pillow is only picking up three of the icons in the first one
[17:37:26] <wiredfool1> what version of pil/pillow are you using?
[17:42:43] <wiredfool1> it does look like that works in 2.2.1
[17:49:16] <mikeybisbo> Right, okay I'm getting somewhere :-) Firstly I realised my experimenting was on a different venv (and older oil) than my project!! So I've read in the ICO files and they're both RGBA :-)
[18:04:14] <mikeybisbo> wiredfool1: awesome, this is working great! https://gist.github.com/mwaterfall/d121b2ce299248a6466f
[18:05:14] <mikeybisbo> wiredfool1: I'm splitting the colours and detecting the most prominent one (avoiding B&W and colours that are too light to go against white).