We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e92997 commit eb1b866Copy full SHA for eb1b866
tools/turing-theme-extractor.py
@@ -24,7 +24,7 @@
24
import sys
25
26
PNG_SIGNATURE = b'\x89\x50\x4E\x47\x0D\x0A\x1A\x0A'
27
-PNG_IEND = b'IEND'
+PNG_IEND = b'\x49\x45\x4E\x44\xAE\x42\x60\x82'
28
29
MIN_PYTHON = (3, 7)
30
if sys.version_info < MIN_PYTHON:
@@ -65,7 +65,7 @@
65
# Extract PNG data to a file
66
theme_file.seek(header_found)
67
png_file = open('theme_res_' + str(header_found) + '.png', 'wb')
68
- png_file.write(theme_file.read(iend_found-header_found))
+ png_file.write(theme_file.read(iend_found - header_found + len(PNG_IEND)))
69
png_file.close()
70
71
print("PNG extracted to theme_res_%s.png" % str(header_found))
0 commit comments