Py3 fixes for ImageQt.align8to32

This commit is contained in:
Christoph Gohlke 2015-09-29 22:28:42 -07:00
parent a5da0e0c4a
commit 6736344703

View File

@ -108,10 +108,10 @@ def align8to32(bytes, width, mode):
return bytes return bytes
new_data = [] new_data = []
for i in range(len(bytes) / bytes_per_line): for i in range(len(bytes) // bytes_per_line):
new_data.append(bytes[i*bytes_per_line:(i+1)*bytes_per_line] + '\x00' * extra_padding) new_data.append(bytes[i*bytes_per_line:(i+1)*bytes_per_line] + b'\x00' * extra_padding)
return ''.join(new_data) return b''.join(new_data)
def _toqclass_helper(im): def _toqclass_helper(im):
data = None data = None