[Kde-games-devel] A simple svg optimizer

Aaron J. Seigo aseigo at kde.org
Wed Dec 19 20:45:44 CET 2007


On Wednesday 19 December 2007, Luciano Montanaro wrote:
> I've been thinking for a while that we should do domething to reduce
> size/loading time for our SVG graphics, if possible, and yesterday evening
> I put together a small program to strip svg file of tags/attributes that
> are not affecting the final look.

note that tackat has done pretty much the same thing for marble, though he 
just used a perl script iirc. it's in there with the marble source somewhere.

something that you could also do that can reduce things significantly is to 
get reduce the precision of the floating point values. it probably isn't 
necessary to have all 16 decimal places that inkscape tends to put in 
there ;) 3 or 4 is probably plenty of sub-pixel perfection. this shaves 
another 7% or so off the size of the files ime, even more with files with 
tons of items.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20071219/3425a352/attachment.pgp 


More information about the kde-games-devel mailing list