File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ devel 201y/mm/dd
1111 - MSSLinux: fix object has no attribute 'display' into __del__
1212 - MSSLinux: use of XDestroyImage() instead of XFree()
1313 - MSSLinux: few optimizations into get_pixels()
14- - MSSWindows: optimization of get_pixels()
14+ - MSSWindows: huge optimization of get_pixels()
1515
16160.1.1 2015/04/10
1717 - little code review
Original file line number Diff line number Diff line change @@ -667,10 +667,8 @@ def get_pixels(self, monitor):
667667 windll .gdi32 .DeleteObject (bmp )
668668
669669 # Replace pixels values: BGR to RGB
670- # @TODO: this part takes most of the time. Need a better solution.
671- for idx in range (0 , buffer_len - 2 , 3 ):
672- self .image [idx + 2 ], self .image [idx ] = \
673- self .image [idx ], self .image [idx + 2 ]
670+ self .image [2 :buffer_len :3 ], self .image [0 :buffer_len :3 ] = \
671+ self .image [0 :buffer_len :3 ], self .image [2 :buffer_len :3 ]
674672 return self .image
675673
676674
You can’t perform that action at this time.
0 commit comments