File tree 2 files changed +3
-5
lines changed
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
11
11
- MSSLinux: fix object has no attribute 'display' into __del__
12
12
- MSSLinux: use of XDestroyImage() instead of XFree()
13
13
- MSSLinux: few optimizations into get_pixels()
14
- - MSSWindows: optimization of get_pixels()
14
+ - MSSWindows: huge optimization of get_pixels()
15
15
16
16
0.1.1 2015/04/10
17
17
- little code review
Original file line number Diff line number Diff line change @@ -667,10 +667,8 @@ def get_pixels(self, monitor):
667
667
windll .gdi32 .DeleteObject (bmp )
668
668
669
669
# 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 ]
674
672
return self .image
675
673
676
674
You can’t perform that action at this time.
0 commit comments