Removed unnecessary brackets

This commit is contained in:
Andrew Murray 2017-03-24 20:39:48 +11:00
parent 272377097a
commit a34adc1bd0

View File

@ -144,7 +144,7 @@ def _dxt1(data, width, height):
else: else:
r, g, b = 0, 0, 0 r, g, b = 0, 0, 0
idx = 4 * ((y + j) * width + (x + i)) idx = 4 * ((y + j) * width + x + i)
ret[idx:idx+4] = struct.pack('4B', r, g, b, 255) ret[idx:idx+4] = struct.pack('4B', r, g, b, 255)
return bytes(ret) return bytes(ret)
@ -201,7 +201,7 @@ def _dxt5(data, width, height):
elif cc == 3: elif cc == 3:
r, g, b = _c3(r0, r1), _c3(g0, g1), _c3(b0, b1) r, g, b = _c3(r0, r1), _c3(g0, g1), _c3(b0, b1)
idx = 4 * ((y + j) * width + (x + i)) idx = 4 * ((y + j) * width + x + i)
ret[idx:idx+4] = struct.pack('4B', r, g, b, alpha) ret[idx:idx+4] = struct.pack('4B', r, g, b, alpha)
return bytes(ret) return bytes(ret)
@ -241,8 +241,7 @@ class DdsImageFile(ImageFile.ImageFile):
self.decoder = "DXT5" self.decoder = "DXT5"
codec = _dxt5 codec = _dxt5
else: else:
raise NotImplementedError("Unimplemented pixel format %r" % raise NotImplementedError("Unimplemented pixel format %r" % fourcc)
(fourcc))
self.tile = [ self.tile = [
(self.decoder, (0, 0) + self.size, 0, (self.mode, 0, 1)) (self.decoder, (0, 0) + self.size, 0, (self.mode, 0, 1))