Optimize all SVGs

Passed with svgo 0.4.2 <https://github.com/svg/svgo>, then prepended
'<?xml version="1.0" encoding="UTF-8"?>' prolog to each file since
svgo sees it fit to remove it and that breaks file type detection.
svgo truncated all numerical values to a maximum of 3 decimal places
of precision.

world_map.svg: Removed very tiny separated path segments (by
insetting and then outsetting the path). Scaled down to the size at
which the image is used. This makes the image smaller than 32 KiB so
it will now be inlined be resource loader instead of beign requested
separately.

Image            orig     new
clear            1268     298
close            1370     369
icon-language    2560    1816
search           1025     480
world_map       71624   19488
This commit is contained in:
Bartosz Dziewoński
2014-02-20 08:47:09 +00:00
committed by Niklas Laxström
parent 43abc4ed73
commit f00cf295d3
5 changed files with 5 additions and 148 deletions

45
images/clear.svg Executable file → Normal file
View File

@@ -1,44 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="12.520475"
height="12.52047"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<rect
width="1.6884073"
height="16.018188"
x="-0.84419048"
y="0.84421676"
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"
id="rect9372-5-6-44-7-7-7-4"
style="fill:#555555;fill-opacity:1;stroke:none" />
<rect
width="1.6884073"
height="16.018188"
x="8.0091028"
y="-8.0090809"
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"
id="rect9372-5-6-44-7-7-7-4-0"
style="fill:#555555;fill-opacity:1;stroke:none" />
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="12.52" height="12.52"><rect width="1.688" height="16.018" x="-.844" y=".844" transform="rotate(-45)" fill="#555"/><rect width="1.688" height="16.018" x="8.009" y="-8.009" transform="rotate(45)" fill="#555"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 298 B

49
images/close.svg Executable file → Normal file
View File

@@ -1,48 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="13.591901"
height="13.591884"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-578.6585,-309.30142)"
id="layer1">
<rect
width="3.2036376"
height="16.018188"
x="188.86241"
y="629.48431"
transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"
id="rect9372-4-9-5-4-0"
style="fill:#555555;fill-opacity:1;stroke:none" />
<rect
width="3.2036376"
height="16.018188"
x="-639.09521"
y="182.45512"
transform="matrix(-0.70710678,-0.70710678,0.70710678,-0.70710678,0,0)"
id="rect9372-5-6-44-7-7-7"
style="fill:#555555;fill-opacity:1;stroke:none" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="13.592" height="13.592"><g transform="translate(-578.659 -309.301)" fill="#555"><rect width="3.204" height="16.018" x="188.862" y="629.484" transform="rotate(-45)"/><rect width="3.204" height="16.018" x="-639.095" y="182.455" transform="matrix(-.707 -.707 .707 -.707 0 0)"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 369 B

View File

@@ -1,26 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="27px" height="16px" xml:space="preserve">
<path id="rect3143-3-5-1-2-7-3-8" fill="#D3E3F4" d="M0,0h11.876v16H0V0z"/>
<path id="rect3143-3-5-0-5-5-5-8-0" fill="#E9E9E9" d="M12.819,0v15.969h10.755c1.085-2.578,1.837-4.991,3.062-8.591L23.574,0
H12.819z"/>
<path id="path3823-6-9" fill="#434343" d="M14.828,4.146c0.32,0.023,0.639,0.035,0.951,0.035c0.471,0,0.922-0.016,1.354-0.046
l0.023-0.258L17.19,3.51c0.02-0.195,0.046-0.432,0.081-0.711c0.019-0.176,0.03-0.287,0.033-0.333l0.873,0.058
c-0.073,0.577-0.133,1.091-0.179,1.542c1.116-0.119,2.233-0.331,3.349-0.637l0.092,0.809c-1.078,0.271-2.251,0.472-3.521,0.602
c-0.05,0.463-0.082,0.968-0.098,1.514c0.524-0.187,1.14-0.313,1.847-0.378c0.064-0.207,0.136-0.461,0.213-0.763l0.865,0.201
c-0.027,0.123-0.088,0.315-0.184,0.579c0.814,0.104,1.461,0.34,1.938,0.711c0.681,0.542,1.021,1.252,1.021,2.128
c0,0.963-0.406,1.746-1.221,2.351c-0.635,0.47-1.505,0.784-2.609,0.94l-0.505-0.779c0.968-0.104,1.739-0.337,2.317-0.7
c0.733-0.458,1.101-1.066,1.101-1.823c0-0.772-0.341-1.363-1.021-1.772c-0.345-0.21-0.764-0.344-1.256-0.401
c-0.604,1.422-1.4,2.598-2.387,3.527c0.035,0.352,0.102,0.715,0.201,1.09l-0.849,0.314c-0.019-0.107-0.062-0.365-0.126-0.773
c-0.654,0.462-1.27,0.693-1.847,0.693c-0.696,0-1.044-0.407-1.044-1.222c0-1.104,0.591-2.103,1.771-2.993
c0.227-0.165,0.532-0.352,0.918-0.562c0.012-0.524,0.046-1.128,0.104-1.812c-0.585,0.046-1.143,0.069-1.675,0.069
c-0.206,0-0.37-0.004-0.493-0.011L14.828,4.146 M16.955,7.53c-0.268,0.161-0.545,0.392-0.831,0.694
c-0.612,0.619-0.94,1.226-0.986,1.817c0,0.054-0.006,0.094-0.017,0.121c0.011,0.038,0.017,0.084,0.017,0.138
c0,0.252,0.112,0.378,0.339,0.378c0.492,0,1.02-0.258,1.582-0.773C17.002,9.292,16.967,8.501,16.955,7.53 M19.41,6.646
c-0.57,0.08-1.111,0.226-1.623,0.436c0,0.883,0.018,1.581,0.052,2.093C18.473,8.468,18.997,7.625,19.41,6.646"/>
<path id="path3820-9-1" fill="#1A1A1A" d="M8.517,11.735L7.783,9.326h-3.69l-0.734,2.409H1.046L4.619,1.57h2.625l3.587,10.165H8.517
M7.271,7.525C6.592,5.342,6.209,4.107,6.122,3.821c-0.083-0.286-0.143-0.512-0.18-0.678C5.789,3.733,5.353,5.194,4.633,7.525H7.271
"/>
<path id="rect3143-2-8-3-2-0-7-1" fill="#BCBCBC" d="M12.817,13.5V16h10.757l0.98-2.5C20.881,13.5,16.491,13.5,12.817,13.5z"/>
<path id="rect14723-7-2-9" fill="#3692D0" d="M0.011,13.511H3.58l2.367-3.116l2.367,3.116h3.57v2.484H0.011V13.511z"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="27" height="16"><path fill="#D3E3F4" d="M0 0h11.876v16h-11.876v-16z"/><path fill="#E9E9E9" d="M12.819 0v15.969h10.755c1.085-2.578 1.837-4.991 3.062-8.591l-3.062-7.378h-10.755z"/><path fill="#434343" d="M14.828 4.146c.32.023.639.035.951.035.471 0 .922-.016 1.354-.046l.023-.258.034-.367.081-.711.033-.333.873.058c-.073.577-.133 1.091-.179 1.542 1.116-.119 2.233-.331 3.349-.637l.092.809c-1.078.271-2.251.472-3.521.602-.05.463-.082.968-.098 1.514.524-.187 1.14-.313 1.847-.378.064-.207.136-.461.213-.763l.865.201c-.027.123-.088.315-.184.579.814.104 1.461.34 1.938.711.681.542 1.021 1.252 1.021 2.128 0 .963-.406 1.746-1.221 2.351-.635.47-1.505.784-2.609.94l-.505-.779c.968-.104 1.739-.337 2.317-.7.733-.458 1.101-1.066 1.101-1.823 0-.772-.341-1.363-1.021-1.772-.345-.21-.764-.344-1.256-.401-.604 1.422-1.4 2.598-2.387 3.527.035.352.102.715.201 1.09l-.849.314-.126-.773c-.654.462-1.27.693-1.847.693-.696 0-1.044-.407-1.044-1.222 0-1.104.591-2.103 1.771-2.993.227-.165.532-.352.918-.562.012-.524.046-1.128.104-1.812-.585.046-1.143.069-1.675.069l-.493-.011-.071-.822m2.127 3.384c-.268.161-.545.392-.831.694-.612.619-.94 1.226-.986 1.817l-.017.121.017.138c0 .252.112.378.339.378.492 0 1.02-.258 1.582-.773-.057-.613-.092-1.404-.104-2.375m2.455-.884c-.57.08-1.111.226-1.623.436 0 .883.018 1.581.052 2.093.634-.707 1.158-1.55 1.571-2.529"/><path fill="#1A1A1A" d="M8.517 11.735l-.734-2.409h-3.69l-.734 2.409h-2.313l3.573-10.165h2.625l3.587 10.165h-2.314m-1.246-4.21c-.679-2.183-1.062-3.418-1.149-3.704-.083-.286-.143-.512-.18-.678-.153.59-.589 2.051-1.309 4.382h2.638"/><path fill="#BCBCBC" d="M12.817 13.5v2.5h10.757l.98-2.5h-11.737z"/><path fill="#3692D0" d="M.011 13.511h3.569l2.367-3.116 2.367 3.116h3.57v2.484h-11.873v-2.484z"/></svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

17
images/search.svg Executable file → Normal file
View File

@@ -1,16 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g transform="translate(-576.51154,-295.86765)">
<path fill="#555" d="m579.89,299.24c4.5027-4.5027,11.806-4.5027,16.308,0.00006,4.0722,4.0722,4.4169,10.425,1.1232,14.936l11.191,11.191-2.4962,2.4962-11.191-11.191c-4.5102,3.2936-10.863,2.9491-14.935-1.1234-4.5028-4.5026-4.5028-11.806-0.00008-16.308zm2.1218,2.1219c-3.3423,3.3421-3.3839,8.7642-0.0416,12.107,3.3423,3.3422,8.8059,3.3422,12.148-0.00002,3.3422-3.3424,3.3006-8.7643-0.0417-12.107-3.3422-3.3421-8.7226-3.3421-12.065,0.00013z"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" height="32" width="32"><path fill="#555" d="M3.378 3.372c4.503-4.503 11.806-4.503 16.308 0 4.072 4.072 4.417 10.425 1.123 14.936l11.191 11.191-2.496 2.496-11.191-11.191c-4.51 3.294-10.863 2.949-14.935-1.123-4.503-4.503-4.503-11.806 0-16.308zm2.122 2.122c-3.342 3.342-3.384 8.764-.042 12.107 3.342 3.342 8.806 3.342 12.148 0 3.342-3.342 3.301-8.764-.042-12.107-3.342-3.342-8.723-3.342-12.065 0z"/></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 480 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 19 KiB