File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,8 @@ def colormap(x):
156
156
height , width , nblayers = arr .shape
157
157
158
158
if nblayers not in [1 , 3 , 4 ]:
159
- raise ValueError ('Data must be NxM (mono), '
160
- 'NxMx3 (RGB), or NxMx4 (RGBA)' )
159
+ raise ValueError ('Data must be NxM (mono), '
160
+ 'NxMx3 (RGB), or NxMx4 (RGBA)' )
161
161
assert arr .shape == (height , width , nblayers )
162
162
163
163
if nblayers == 1 :
@@ -191,10 +191,10 @@ def colormap(x):
191
191
for i in range (height )])
192
192
193
193
def png_pack (png_tag , data ):
194
- chunk_head = png_tag + data
195
- return (struct .pack ('!I' , len (data )) +
196
- chunk_head +
197
- struct .pack ('!I' , 0xFFFFFFFF & zlib .crc32 (chunk_head )))
194
+ chunk_head = png_tag + data
195
+ return (struct .pack ('!I' , len (data )) +
196
+ chunk_head +
197
+ struct .pack ('!I' , 0xFFFFFFFF & zlib .crc32 (chunk_head )))
198
198
199
199
return b'' .join ([
200
200
b'\x89 PNG\r \n \x1a \n ' ,
You can’t perform that action at this time.
0 commit comments