Clarified code

This commit is contained in:
Andrew Murray 2022-02-15 21:47:12 +11:00
parent 902e3812a8
commit fbd23bbf28

View File

@ -208,7 +208,7 @@ _ENDIAN = "<" if sys.byteorder == "little" else ">"
def _conv_type_shape(im):
m = ImageMode.getmode(im.mode)
shape = (im.size[1], im.size[0])
shape = (im.height, im.width)
extra = len(m.bands)
if extra != 1:
shape += (extra,)