diff options
author | MarcoFalke <falke.marco@gmail.com> | 2015-09-26 18:01:28 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2015-10-09 17:09:05 +0200 |
commit | 3507992bcfd5a6b24355d9f652e5e249db725e44 (patch) | |
tree | 1e3f2fedcc48c4304b9fb492164bcb00b358e70e /contrib/devtools | |
parent | 8a320c7956f1cb051305a7664d7c6bb8d555e5e7 (diff) |
[trivial] Make optimize-pngs.py also cover share/pixmaps
Also fix:
"Exception: tostring() has been removed. Please call tobytes() instead."
Diffstat (limited to 'contrib/devtools')
-rwxr-xr-x | contrib/devtools/optimize-pngs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py index b6d6a097d6..799e0cc7d0 100755 --- a/contrib/devtools/optimize-pngs.py +++ b/contrib/devtools/optimize-pngs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ''' -Run this scrip every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). +Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). #pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text ''' import os @@ -18,12 +18,12 @@ def content_hash(filename): '''Return hash of RGBA contents of image''' i = Image.open(filename) i = i.convert('RGBA') - data = i.tostring() + data = i.tobytes() return hashlib.sha256(data).hexdigest() pngcrush = 'pngcrush' git = 'git' -folders = ["src/qt/res/movies", "src/qt/res/icons"] +folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"] basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n') totalSaveBytes = 0 noHashChange = True |