================ SVG Optimization ================ This is an example of SVG optimization. The drawing used in the example is the logo of University of Jyväskylä, Finland. Files ===== - jyu-00-original.svg Original logo from Pro Gradu template. - jyu-01-simplified.svg Simplified in Inkscape, default settings. - jyu-02-optimized.svg Final, optimized file. - jyu-03-minimized.svgz Removed line feeds and ids and compressed it with gzip. Not for human consumption. :) Used techniques =============== 1. Converted path to stroke manually by removing inner side of the path, insetting the path and setting stroke with equal to the original stroke. This reduced the number of nodes from 164 to 88 (-47 %). 2. Simplified the stroke by removing unnecessary points on the path. This reduced node count from 88 to 34 (-62 %). 3. Converted curve segments to line segments in places where only straight lines occur. Line segments produce simpler SVG path string than curves do. 4. Scaled the SVG to the width of 1000 pixels. The intention is to truncate the decimal part while keeping the precision of the drawing good enough. 5. From Inkscape preferences, set numeric precision to 3 and minimum exponent to -3. Although it didn't work as good as it could have been, it rounded the values to integers in almost all cases. 6. Ungrouped. Ungrouping removes extra g-elements from the XML tree. 7. Saved as Plain SVG. This format doesn't contain "sodipodi" attributes used SVG editing. By specs, those are not used by an SVG viewer. 8. Opened the SVG in my favourite text editor, which is, of course, Emacs. 1. Removed extra namespaces from XML root element. 2. Rounded those values that were not properly rounded (look for "."). 3. Removed unnecessary SVG elements and attributes. You may need to check SVG specs at http://www.w3.org/TR/SVG/ for default values. 3. Indented the file for human reading. You may choose to minimize instead. 9. Reset Inkscape preferences back to their original values. Weird things will happen if rounding is left on in everyday use. Results ======= Original file size: 8487 bytes Simplified: 4939 Final: 1209 Compressed: 609 And the final version is even human readable! You can see beautiful collection of lines and curves. Why === It was fun and I learned some niche features from Inkscape and SVG format while I was doing this. License ======= All my work here is public domain. I'm not sure about the rights to use the logo of my university. So please check by yourself if you redistribute or do derivate works.