[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Optimizing arch-independent game data (png, for example)


Many games use .png files for their graphics. Usually these files are
not very optimized, and they can be reduced in size through optipng,
without losing any quality at all. Calling optipng, especially with -o
7, can be quite costly, at least it takes more time in my computer
than to compile the game, but it is only done once, for the
arch-independent packages, and will usually be compiled just in the
uploader's computer, as all the pbuilders will just compile the arch
dependent packages, so no extra cost for pbuilders will probably be
added. The result is quite smaller arch independent files that, even
though not extremelly smaller (about an 8% for me) it might worth the
effort. Any thoughts about it?



5584    themes/
364     menuimg/

After optipng -o 7:

5180    debian/chapping-data/usr/share/games/chapping/themes/
328     debian/chapping-data/usr/share/games/chapping/menuimg/

As a side question, I wonder if that optimization should be disabled
if noopt is used:

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        for i in `find $(CURDIR)/debian/chapping-data -name "*.png"`;
do echo "Optimizing image $$i"; optipng -o 7 -q "$$i"; done

Any thoughts about it?


Reply to: