Skip to content

Commit 3a62483

Browse files
committed
Initial Testing
Initial testing of the transparency block.
1 parent 72a7a4a commit 3a62483

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

adafruit_imageload/png.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ def load(
6161
height = 0
6262
while True:
6363
size, chunk = struct.unpack(">I4s", file.read(8))
64+
print("==================")
65+
print(size)
66+
print(chunk)
67+
print('====================')
6468
if chunk == b"IHDR":
6569
(
6670
width,
@@ -86,6 +90,9 @@ def load(
8690
pal = palette(pal_size)
8791
for i in range(pal_size):
8892
pal[i] = file.read(3)
93+
elif chunk == b"tRNS":
94+
transparent = file.read(size)
95+
print(transparent)
8996
elif chunk == b"IDAT":
9097
data.extend(file.read(size))
9198
elif chunk == b"IEND":

0 commit comments

Comments
 (0)