Skip to content

Commit 9142867

Browse files
author
Marco
committed
[QT] cleanup icons
* Cleanup SVG code * Unify design ("Typicons" seem to have round edges) * Fix transparency issue with clock5.png
1 parent 86cfd23 commit 9142867

File tree

15 files changed

+99
-55
lines changed

15 files changed

+99
-55
lines changed

contrib/devtools/optimize-pngs.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env python
2-
2+
'''
3+
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).
4+
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
5+
'''
36
import os
47
import sys
58
import subprocess
@@ -18,14 +21,12 @@ def content_hash(filename):
1821
data = i.tostring()
1922
return hashlib.sha256(data).hexdigest()
2023

21-
#optimize png, remove various color profiles, remove ancillary chunks (alla) and text chunks (text)
22-
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
23-
2424
pngcrush = 'pngcrush'
2525
git = 'git'
26-
folders = ["src/qt/res/movies", "src/qt/res/icons", "src/qt/res/images"]
26+
folders = ["src/qt/res/movies", "src/qt/res/icons"]
2727
basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n')
2828
totalSaveBytes = 0
29+
noHashChange = True
2930

3031
outputArray = []
3132
for folder in folders:
@@ -68,6 +69,7 @@ def content_hash(filename):
6869
oldHash = fileDict['sha256Old']
6970
newHash = fileDict['sha256New']
7071
totalSaveBytes += fileDict['osize'] - fileDict['psize']
72+
noHashChange = noHashChange and (oldHash == newHash)
7173
print fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n"
7274

73-
print "completed. Total reduction: "+str(totalSaveBytes)+" bytes"
75+
print "completed. Checksum stable: "+str(noHashChange)+". Total reduction: "+str(totalSaveBytes)+" bytes"

src/qt/res/icons/about_qt.png

-98 Bytes
Loading

src/qt/res/icons/clock1.png

697 Bytes
Loading

src/qt/res/icons/clock2.png

667 Bytes
Loading

src/qt/res/icons/clock3.png

498 Bytes
Loading

src/qt/res/icons/clock4.png

514 Bytes
Loading

src/qt/res/icons/clock5.png

-230 Bytes
Loading

src/qt/res/icons/transaction0.png

90 Bytes
Loading

src/qt/res/icons/warning.png

-1009 Bytes
Loading

src/qt/res/src/clock_1.svg

Lines changed: 3 additions & 1 deletion
Loading

0 commit comments

Comments
 (0)