Re: pngcrush
Posted: 24 Jul 2013, 16:44
One sadness is that whenever a program like pngcrush is applied, it makes the repository bigger. And once it is accepted to use such programs at all, there tends to be a war over saving a few bytes (e.g. with optipng), despite the fact that this means the history can't be shared at all.
However, it would indeed be beneficial if we do it once, and possibly add a commit hook to prevent images. Sadly, commit hooks have to be enabled manually in the individual repositories ...
In the long term, I'd like to switch all the graphics to a minimal, uncompressed format (probably PNM), since uncompressed images are smaller both in the repository and in the update zips. Or is there anything stopping us from doing that now?
I do *not* think a hypothetical future client that accesses the images directly is sufficient reason to not switch to uncompressed versions. But HTTP offers transfer level compression anyway, and there *is* an nginx module that can be used to prevent recompressing the file every time on the server side.
Speaking in hard numbers, plant.pnm, 12109 bytes uncompressed and 1126 bytes gzipped.
(Note: even though most of our images are going to be PPM, I suggest using the pnm extension so that tools can automatically use PGM or PBM if appropriate. This is only non-beneficial if an image switches between the formats over time ...)
However, it would indeed be beneficial if we do it once, and possibly add a commit hook to prevent images. Sadly, commit hooks have to be enabled manually in the individual repositories ...
In the long term, I'd like to switch all the graphics to a minimal, uncompressed format (probably PNM), since uncompressed images are smaller both in the repository and in the update zips. Or is there anything stopping us from doing that now?
I do *not* think a hypothetical future client that accesses the images directly is sufficient reason to not switch to uncompressed versions. But HTTP offers transfer level compression anyway, and there *is* an nginx module that can be used to prevent recompressing the file every time on the server side.
Speaking in hard numbers, plant.pnm, 12109 bytes uncompressed and 1126 bytes gzipped.
(Note: even though most of our images are going to be PPM, I suggest using the pnm extension so that tools can automatically use PGM or PBM if appropriate. This is only non-beneficial if an image switches between the formats over time ...)