summaryrefslogtreecommitdiff
path: root/render-icon-theme.py
diff options
context:
space:
mode:
Diffstat (limited to 'render-icon-theme.py')
-rwxr-xr-xrender-icon-theme.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/render-icon-theme.py b/render-icon-theme.py
index 5badaeba6..7003d882a 100755
--- a/render-icon-theme.py
+++ b/render-icon-theme.py
@@ -8,12 +8,16 @@ import subprocess
INKSCAPE = '/usr/bin/inkscape'
OPTIPNG = '/usr/bin/optipng'
ZOPFLIPNG = '/usr/bin/zopflipng'
+PNGQUANT = '/usr/bin/pngquant'
SRC = os.path.join('.', 'src', 'fullcolor')
inkscape_process = None
def optimize_png(png_file):
- if os.path.exists(ZOPFLIPNG):
+ if os.path.exists(PNGQUANT):
+ process = subprocess.Popen([PNGQUANT, '-f', '--speed', '1', '--output', png_file, png_file])
+ process.wait()
+ elif os.path.exists(ZOPFLIPNG):
process = subprocess.Popen([ZOPFLIPNG, '-y', '-m', png_file, png_file])
process.wait()
elif os.path.exists(OPTIPNG):