summaryrefslogtreecommitdiff
path: root/util/spritegen.pl
AgeCommit message (Collapse)AuthorFilesLines
2019-09-09spritegen.pl: Move compression to "make prod"Yorhel1-10/+1
I think this is the last one. 'make' in a development environment is now beautifully fast and 'make prod' generates nicely small assets. (arguably we could have an even faster dev setup by not generating an icons.png in the first place, but then we'd need more code to differentiate between dev & prod, which is also a pain) This change does remove the "slow" option that would use the compressed image size in the optimization algorithm, but I hadn't used that option for a while anyway, it takes an hour and only saves about 100 bytes.
2016-01-10Support zopfli/zopflipng for all static asset generatorsYorhel1-21/+16
Compresses a little better. I reduced the number of iterations required to find the optimal image size in spritegen.pl, but generating the icons.png is *incredibly slow* when combining zopflipng with the 'slow' option. It's possible to parallelize the calculation and use multiple cores to speed it up, but that seems overkill. Some icons.png compression stats: METHOD SIZE RUNTIME default 18103 <1sec slow 17941 few secs pngcrush 15385 <1sec pngcrush+slow 15148 few mins zopflipng 14986 few secs zopflipng+slow 14898 ~1 hour
2015-08-17spritegen.pl: Add pngcrush/slow options + force png32 + atomic replaceYorhel1-6/+13
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.
2015-05-11Generate icons.png and associated CSS automaticallyYorhel1-0/+143
It became a bit of a hassle to keep updating that file manually in Gimp. This script performs surprisingly well for our set of icons.