Skip to content

Commit ed9624a

Browse files
authored
cosmetic changes (apng)
1 parent 113db56 commit ed9624a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

filetype/types/image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def __init__(self):
6363

6464
def match(self, buf):
6565
if (len(buf) > 8 and
66-
buf[:8] == bytearray([0x89, 0x50, 0x4e, 0x47,
67-
0x0d, 0x0a, 0x1a, 0x0a])):
66+
buf[:8] == bytearray([0x89, 0x50, 0x4e, 0x47,
67+
0x0d, 0x0a, 0x1a, 0x0a])):
6868
#cursor in buf, skip already readed 8 bytes
6969
i = 8
7070
while len(buf) > i:
@@ -74,11 +74,11 @@ def match(self, buf):
7474
chunk_type = buf[i:i+4].decode("ascii")
7575
i += 4
7676

77-
#acTL chunk in APNG should appears first than IDAT
77+
#acTL chunk in APNG must appear before IDAT
7878
#IEND is end of PNG
7979
if (chunk_type == "IDAT" or chunk_type == "IEND"):
8080
return False
81-
elif (chunk_type == "acTL"):
81+
if (chunk_type == "acTL"):
8282
return True
8383

8484
#move to the next chunk by skipping data and crc (4 bytes)

0 commit comments

Comments
 (0)