Skip to content

Commit

Permalink
Fixed incorrect color channels in captured images
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchassassin committed Dec 7, 2018
1 parent 6771f9a commit 6b772e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lackey/RegionMatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,7 @@ def capture(self, *args): #x=None, y=None, w=None, h=None):
elif isinstance(args[0], int):
# Capture region defined by provided x,y,w,h
region = Region(*args)
self.lastScreenImage = region.getBitmap()
self.lastScreenImage = numpy.roll(region.getBitmap(), 1, axis=-1)
png = tempfile.NamedTemporaryFile(mode="wb", suffix=".png", delete=False)
Image.fromarray(self.lastScreenImage).save(png.name)
return png.name
Expand Down

0 comments on commit 6b772e6

Please sign in to comment.