- added a script to remove the bad profiles from resource pictures. From here: https://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile/43415650, link mentioned by @camellan (Andrey Kultyapov)
This commit is contained in:
18
Utils/remove_bad_profiles_from_pictures.py
Normal file
18
Utils/remove_bad_profiles_from_pictures.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
def system_call(args, cwd="."):
|
||||
print("Running '{}' in '{}'".format(str(args), cwd))
|
||||
subprocess.call(args, cwd=cwd)
|
||||
pass
|
||||
|
||||
|
||||
def fix_image_files(root=os.curdir):
|
||||
for path, dirs, files in os.walk(os.path.abspath(root)):
|
||||
# sys.stdout.write('.')
|
||||
for dir in dirs:
|
||||
system_call("mogrify *.png", "{}".format(os.path.join(path, dir)))
|
||||
|
||||
|
||||
fix_image_files(os.curdir)
|
||||
Reference in New Issue
Block a user