python-mss icon indicating copy to clipboard operation
python-mss copied to clipboard

Alpha channel not captured

Open zhichaoh opened this issue 5 years ago • 1 comments

Hello,

RGBA values are ones sent by the underlying layer (the OS). MSS does not alter that data, so if that does not work for you, I am afraid there is nothing that can be done on the MSS level.

Originally posted by @BoboTiG in https://github.com/BoboTiG/python-mss/issues/151#issuecomment-593585866

In the windows.py, the following comments seems to strip off the alpha channel data: https://github.com/BoboTiG/python-mss/blob/229bd0b6ce0c2cc4363cef4740d6ce53c0f67642/mss/windows.py#L237-L242 What is the consideration here?

zhichaoh avatar Mar 23 '20 04:03 zhichaoh

You could use the bgra attribute. It keeps alpha values.

BoboTiG avatar Apr 13 '20 14:04 BoboTiG