From 67363447030671511c9c291bac705e6a14a6960a Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Tue, 29 Sep 2015 22:28:42 -0700 Subject: [PATCH] Py3 fixes for ImageQt.align8to32 --- PIL/ImageQt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PIL/ImageQt.py b/PIL/ImageQt.py index 591d85ff8..b37177aff 100644 --- a/PIL/ImageQt.py +++ b/PIL/ImageQt.py @@ -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