summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-08-17 16:53:43 +0200
committerYorhel <git@yorhel.nl>2015-08-17 17:00:45 +0200
commit5c9b8d37e72792344266fecf5d6336f3e483f677 (patch)
tree9f193dcd064b80a303eec761e768735663f43229 /data
parent6f424c8a6765c00c5df7b359ab4c8d409c758738 (diff)
spritegen.pl: Add pngcrush/slow options + force png32 + atomic replace
A recent version of imagemagick creates 16 bit depth PNG images by default for some reason. This results in an unnecessarily large file size increase and pngcrush doesn't do much to counter it (and its -bit_depth option has been deprecated, too). The atomic replace is quite handy to avoid people seeing any wierd intermediate images while the slow+pngcrush options are being used.
Diffstat (limited to 'data')
-rw-r--r--data/config_example.pl4
-rw-r--r--data/global.pl7
2 files changed, 11 insertions, 0 deletions
diff --git a/data/config_example.pl b/data/config_example.pl
index 9c255bb2..b1e405ce 100644
--- a/data/config_example.pl
+++ b/data/config_example.pl
@@ -40,3 +40,7 @@ package VNDB;
# Uncomment the compression method to use for the generated Javascript (or just leave as-is to disable compression)
#$JSGEN{compress} = 'JavaScript::Minifier::XS';
#$JSGEN{compress} = "|/usr/bin/uglifyjs --compress --mangle";
+
+# Uncomment to generate an extra small icons.png (note: setting both pngcrush and slow options really is slow)
+#$SPRITEGEN{pngcrush} = '/usr/bin/pngcrush';
+#$SPRITEGEN{slow} = 1;
diff --git a/data/global.pl b/data/global.pl
index 5cefa5ff..de810926 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -140,6 +140,13 @@ our %JSGEN = (
);
+# Options for spritegen.pl
+our %SPRITEGEN = (
+ slow => 0,
+ pngcrush => undef,
+);
+
+
# allow the settings to be overwritten in config.pl
require $ROOT.'/data/config.pl' if -f $ROOT.'/data/config.pl';