add pHYs to the replace list
@@ -14,6 +14,7 @@ import io
import re
import string
import struct
+import sys
import zlib
# Local module.
@@ -104,7 +105,7 @@ def process(out, args):
delete = set(args.delete)
# The set of chunks to replace are those where the specification says
# that there should be at most one of them.
- replacing = set([b"gAMA", b"sBIT", b"PLTE", b"tRNS", b"sPLT", b"IHDR"])
+ replacing = set([b"gAMA", b"pHYs", b"sBIT", b"PLTE", b"tRNS", b"sPLT", b"IHDR"])
replace = dict()
add = []
@@ -195,8 +196,6 @@ def hex_color(s):
def main(argv=None):
- import sys
-
if argv is None:
argv = sys.argv
