diff --git a/tests/capture.py b/tests/capture.py index 2ad9385..a7b7583 100755 --- a/tests/capture.py +++ b/tests/capture.py @@ -36,10 +36,12 @@ c_buf = c_img.get_data() for x in range(width): for y in range(height): + # The upper byte is don't care, but the location depends on endianness, + # so just set all of them. c_buf[y * c_rowstride + x * 4 + 0] = buf[y * width + x] c_buf[y * c_rowstride + x * 4 + 1] = buf[y * width + x] c_buf[y * c_rowstride + x * 4 + 2] = buf[y * width + x] - # Byte 4 is don't care + c_buf[y * c_rowstride + x * 4 + 3] = buf[y * width + x] c_img.mark_dirty() c_img.write_to_png(sys.argv[1])