File talk:Spain traffic signal s510.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Traffic signals in Spain[edit]

Many SVG graphics in Category:Diagrams of road signs of Spain are made with Adobe Illustrator and remain unreviewed. One extrem example is "Spain traffic signal s510.svg".

This very huge file of 491 954 bytes can be replaced by different SVG structures creating exactly the same output picture with less effort.
The SVG renderer present in Wikimedia Commons treats some line commands inproperly, coordinates as <path «m.5.5» are misinterpreted instead of giving the same result as «m.5,.5».
When this bug is fixed, each of the following versions will give the correct picture:

245 Bytes
<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="10">
<rect width="40" height="10" fill="#FFF"/>
<path stroke="#F00" d="M0,9L40,1"/>
<path stroke="#000" d="M.5.5h39v9H.5z" fill="none"/>
</svg>


User Zupftom found three better solutions (first two lines omitted):

234 Bytes
<path d="m.5.5h39v9H.5z" stroke="#000" fill="#FFF"/>
<svg y="1" height="8">
<path stroke="#F00" d="M1,8.5l38,-9"/>
</svg></svg>
226 Bytes
<path stroke="#F00" fill="#FFF" d="m-2,10h44V0L-2,10V0h44"/>
<path stroke="#000" fill="none" d="m.5.5h39v9H.5z"/>
</svg>
220 Bytes
<path fill="#FFF" d="m.5.5h39v9H.5z" stroke="#000"/>
<path fill="#F00" d="M1,8.8v.2h3.5L39,1.2v-.2h-3.5z"/>
</svg>

This means a reduction ratio of 0004, or less than a half of a promille.