Merge pull request #1446 from cgohlke/patch-1

Py3 fixes for ImageQt.align8to32
This commit is contained in:
Alex Clark 2015-09-30 05:48:55 -04:00
commit 37927d3baa

View File

@ -108,10 +108,10 @@ def align8to32(bytes, width, mode):
return bytes
new_data = []
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)
for i in range(len(bytes) // bytes_per_line):
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):
data = None