Skip to content

Commit 3ce3ce4

Browse files
eruffaldiBoboTiG
authored andcommitted
MSS: Add ScreenShot.bgra property
1 parent af778ab commit 3ce3ce4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mss/screenshot.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ def pixel(self, coord_x, coord_y):
126126
except IndexError:
127127
raise ScreenShotError('Pixel location out of range.', locals())
128128

129+
@property
130+
def bgra(self):
131+
# type: () -> bytes
132+
"""
133+
Compute BGRA values from the BGRA raw pixels.
134+
135+
:return bytes: BGRA pixels.
136+
"""
137+
return bytes(self.raw)
138+
129139
@property
130140
def rgb(self):
131141
# type: () -> bytes

0 commit comments

Comments
 (0)