Hi, when i try to modify an svg image where points are separated from "score" ("-") method getNumbers not parse correctly the image..but if i "turn to path" the element in svg image it works fine...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, could you give me more information on what happens with getNumbers ? In which shape are your points separated from "score". Could you provide the SVG image ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your code is not SVG compliant, there should be spaces between two numbers, i.e.: 100 -100.
The SVG parser of Batik throws an exception because of this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, when i try to modify an svg image where points are separated from "score" ("-") method getNumbers not parse correctly the image..but if i "turn to path" the element in svg image it works fine...
Hi, could you give me more information on what happens with getNumbers ? In which shape are your points separated from "score". Could you provide the SVG image ?
it is an image where there are some cats...this is the code:
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --><svg height="98.61" id="Layer_1" inkscape:version="0.42" sodipodi:docbase="F:\openclip\svg da inviare" sodipodi:docname="Cats and dogs.svg" sodipodi:version="0.32" space="preserve" style="overflow:visible;enable-background:new 0 0 411.838 98.61;" version="1.1" viewBox="0 0 411.838 98.61" width="411.838" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
<metadata>
<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work rdf:about="">
<dc:title>Cani e gatti , Cat and dog</dc:title>
<dc:description></dc:description>
<dc:subject>
<rdf:Bag>
<rdf:li>animal</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:publisher>
<cc:Agent rdf:about="http://www.openclipart.org/">
<dc:title>Open Clip Art Library</dc:title>
</cc:Agent>
</dc:publisher>
<dc:creator>
<cc:Agent>
<dc:title>Architetto Francesco Rollandin</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>Architetto Francesco Rollandin</dc:title>
</cc:Agent>
</dc:rights>
<dc:date></dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
<dc:language>en</dc:language>
</cc:Work>
<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
</cc:License>
</rdf:RDF>
</metadata>
<defs id="defs16"/>
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="Layer_1" inkscape:cx="205.91901" inkscape:cy="49.305000" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="510" inkscape:window-width="787" inkscape:window-x="88" inkscape:window-y="116" inkscape:zoom="1.7361195" pagecolor="#ffffff"/>
<path d="M68.143,98.197c2.866-2.848,2.059-7.587,1.28-11.453 c-1.035-5.142-2.452-8.693-4.816-13.397c-0.938-1.868-2.394-3.594-3.56-5.333c-1.048-1.563-0.793-4.031-1.923-5.529 c-1.605-2.129-3.211-4.259-4.817-6.388c-1.133-1.503-3.206-2.61-4.078-4.221c-0.994-1.836-1.007-5.003-1.418-7.048 c-0.433-2.15-1.35-3.798-2.345-5.778c-1.841-3.661-3.405-7.793-3.405-11.943c0-3.919,1.174-10.307-0.566-13.771 c-1.399-2.786-0.925-3.029,0.489-5.846c0.393-0.782,0.412-4.663,0.077-5.498c-0.247-0.616-1.312-1.306-1.79-1.782 c0.385,2.364-1.792,2.793-1.792,5.067c0,0.483-1.689,0.482-1.869,0.125c-0.547-1.087-0.992-2.433-1.715-3.41 c-0.911-1.23-3.582-3.223-3.582-0.627c0,3.191,0.251,3.943-1.979,6.157c-3.407,3.385-8.242,3.553-12.531,2.131 c-4.254-1.411-7.599-2.316-12.085-2.316c-0.595,0-0.28,2.31-0.28,2.856c0,1.097,0.837,1.54,1.606,2.304 c2.227,2.215,1.976,2.967,1.976,6.157c0,1.703-0.596,4.124,0.631,5.344c1.727,1.719,3.949,1.156,6.339,1.156 c3.628,0,7.37,5.349,9.686,7.654c3.063,3.048,0.659,8.396-0.529,11.941c-0.362,1.081-0.978,4.942-1.946,5.423 c-1.092,0.542-2.185,1.084-3.277,1.627c-0.834,0.415,0.635,1.857-0.713,1.857c-2.329,0-4.659,0-6.988,0 c-2.148,0-3.636,1.915-4.992,3.565c-2.786,3.391-4.645,7.455-6.6,11.342c-1.083,2.153-0.885,2.911,1.505,2.911 c1.692,0,4.366-0.695,5.36-2.179c1.12-1.67,3.316-3.778,3.316-5.838c0-1.759,3.982-0.892,5.527-0.892 c2.045,0,4.25-0.323,6.205,0.326c2.827,0.938,4.393,0.515,4.393,3.523c0,5.329,0.522,9.957,1.405,15.222 c0.381,2.272,0.123,3.096-0.631,5.344c-0.173,0.516-0.43,2.309-1.054,2.309c-1.704,0-1.886,0.373-3.116,1.598 c-1.761,1.752-1.979,2.211-1.979,4.639c0,1.615,3.841,2.438,5.374,2.672c2.401,0.365,5.129,0,7.559,0c2.531,0,1.4-3.025,1.4-5.192 c0-1.566-0.544-4.145,0.032-5.576c1.034-2.568,2.067-5.136,3.1-7.703c0.685-1.701,2.115-2.778,3.404-4.063 c1.416-1.411,4.214,0.818,4.214,2.559c0,2.316,0.518,4.221,1.087,6.481c0.742,2.949,0.385,3.44-1.01,6.216 c-0.169,0.336-2.18-0.893-2.527-1.065c-1.345-0.669-1.201-0.497-2.294,0.591c-0.903,0.9-1.118,4.775-0.63,5.972 c1.418,3.477,9.552,1.781,12.25,1.781C58.394,98.197,63.269,98.197,68.143,98.197" id="path3" style="fill-rule:evenodd;clip-rule:evenodd;fill:#666666;"/>
<path d="M86.06,98.197c-0.586,0-5.375,0.239-5.375-0.278 c0-2.474-0.835-4.823-1.437-7.217c-0.962-3.828-4.733-7.547-7.521-10.319c-2.092-2.08-1.792-2.726-1.792-5.755 c0-1.972,0-3.943,0-5.916c0-4.998,0-9.996,0-14.993c0-4.47,1.792-8.496,1.792-12.91c0-1.99-1.792-3.432-1.792-5.245 c0-1.621-0.109-1.501,1.512-1.501c1.222,0,2.443,0,3.665,0c5.44,0,3.781,6.723,3.781,10.279c0,2.036,0.025,3.85-0.374,5.832 c-0.384,1.91-1.785,5.223-1.4,7.138c0.596,2.962,1.774,6.25,1.774,9.272c0,4.212-0.077,6.519,1.792,10.235 c-0.446-2.492,1.755-5.246,2.632-7.57c1.505-3.991,3.01-7.982,4.515-11.973c1.02-2.704,3.431-6.845,5.394-8.96 c2.413-2.601,6.082-3.723,8.097-6.731c0.955-1.425,1.803-3.116,3.025-4.331c0.937-0.93,3.212-2.367,3.212-3.747 c0-1.64-0.37-3.688,0.156-5.256c0.502-1.497,1.636-3.496,1.636-5.077c0-2.574-0.492-3.119,1.791-4.256 c0.997-0.496,3.583-1.639,3.583-2.952c0-2.205,1.425-1.137,2.952-2.656c1.04-1.035,0.63-2.765,0.63-4.192 c-0.792,4.425,4.276,6.721,5.944,10.036c1.122,2.232,2.246,3.452,4.033,5.23c1.632,1.624,3.828-0.284,4.925,1.897 c1.399,2.78,0.938,2.72-1.198,4.844c-1.428,1.42-3.802,2.997-4.746,4.717c-1.006,1.835-1.179,4.696-1.69,6.733 c-0.35,1.394,2.612,4.44,3.412,5.635c0.631,0.941,0.07,3.78,0.07,5.058c0,1.68,0.858,6.234-0.07,7.621 c-1.13,1.688-2.152,3.889-3.589,5.319c-1.586,1.577-4.205,3.333-5.298,5.268c-1.019,1.804-1.186,4.714-1.693,6.732 c-0.485,1.928-1.56,3.786-1.889,5.738c-0.244,1.45-0.713,5.344,0.895,5.344c0.503,0,2.385-0.268,2.687,0c0.14,0.124,0,1.313,0,1.505 c0,0.575,0.779,1.054,1.161,1.434c0.21,0.21,0.42,0.419,0.631,0.628c-0.535,0.531-1.07,1.063-1.605,1.595 c-0.509,0.505,0.089,1.376-0.187,1.966c-0.961,2.054-2.818,1.781-4.664,1.781c-1.196,0-2.502-1.289-2.502-2.487 c0-2.336-0.181-3.214-1.225-5.292c-1.502-2.988-2.357-6.014-2.357-9.329c0-1.711-1.886-0.521-2.359,0.421 c-0.793,1.577-1.591,2.981-2.573,4.445c-0.811,1.208-2.77,2.803-1.605,3.962c1.367,1.36,2.857,1.999,4.592,2.862 c1.489,0.74,1.946,1.878,1.946,3.358c0,2.558-0.329,2.06-2.874,2.06C99.672,98.197,92.866,98.197,86.06,98.197" id="path5" style="fill-rule:evenodd;clip-rule:evenodd;fill:#996633;"/>
<path d="M206.098,98.197c-0.379-2.326,1.792-2.614,1.792-4.717 c0-2.101,0.038-4.004-0.374-6.05c-1.041-5.174-2.257-8.717-4.627-13.433c-0.932-1.855-2.243-3.531-3.397-5.252 c-1.13-1.686-1.554-3.799-2.196-5.713c-1.256-3.745-5.538-7.6-8.34-10.386c-2.538-2.522-1.565-7.683-3.195-10.926 c-0.759-1.511-2.953-4.305-2.953-5.998c0-2.188,0.506-4.995-0.026-7.11c-1.228-4.881-1.766-8.664-1.766-13.695 c0-1.807,0-3.613,0-5.42c0-2.762-0.22-3.723,1.792-5.722c-1.021-1.015-3.075-4.073-4.215-2.938c-1.076,1.07-1.161,1.158-1.161,2.659 c0,1.222,0.479,2.059-0.895,2.059c-1.625,0-2.687-2.907-2.687-4.455c0-1.401-3.584-1.623-3.584,0.264c0,3.018,0.32,3.875-1.79,5.972 c-2.001,1.989-3.359,2.17-6.138,2.861c-4.367,1.086-8.38-1.142-12.589-2.536c-1.742-0.577-3.634-0.325-5.46-0.325 c-2.605,0-0.285,4.171,0.709,5.16c2.063,2.055,1.979,2.481,1.979,5.43c0,2.112,0,4.223,0,6.335c0,1.683,3.462,0.892,4.994,0.892 c1.98,0,4.35,0.383,5.856,1.882c1.419,1.411,2.838,2.821,4.256,4.232c2.521,2.508,2.81,2.722,2.81,6.258 c0,4.142-2.229,8.529-3.542,12.446c-0.28,0.837-3.862,2.142-4.785,3.059c-1.301,1.292-4.898,0.626-6.636,0.626 c-3.333,0-6.833,6.363-8.327,8.909c-1.001,1.706-1.798,3.575-2.688,5.345c-1.132,2.251-1.711,3.564,1.176,3.564 c1.216,0,4.71-0.639,5.136-1.908c0.692-2.065,0.868-4.779,2.884-5.782c3.281-1.633,8.811-2.081,12.389-0.894 c2.079,0.689,4.393,0.516,4.393,2.849c0,2.429-0.389,5.198,0.013,7.593c0.795,4.744,2.3,9.059,0.761,13.646 c-0.623,1.857-0.329,2.309-2.286,2.309c-0.903,0-2.542,2.252-3.232,2.938c-2.644,2.634,2.325,4.768,4.184,5.691 c2.397,1.191,6.752,0.278,9.417,0.278c0.183,0,0.101-7.849,0.101-8.807c0-3.233,1.708-6.13,2.906-9.109 c0.563-1.398,3.31-5.719,4.82-4.968c2.576,1.282,4.814,2.772,4.814,6.032c0,4.074,0.014,6.135-1.79,9.727 c-1.662-1.654-1.503-1.927-3.584-0.892c-0.925,0.46-3.584,1.641-3.584,2.872c0,1.056,0,2.11,0,3.166c0,0.572,1.431-0.05,1.792,0.197 c1.13,0.772,1.262,1.781,2.652,1.781C189.949,98.197,198.023,98.197,206.098,98.197" id="path7" style="fill-rule:evenodd;clip-rule:evenodd;fill:#CC9933;"/>
<path d="M224.015,98.197c-0.586,0-5.374,0.239-5.374-0.278 c0-2.499-1.542-4.569-2.655-6.782c-0.904-1.8-1.329-3.438-1.825-5.41c-0.743-2.955-1.066-3.731-3.217-5.871 c-2.652-2.638-3.054-7.479-3.054-11.143c0-5.08-0.022-9.599,0.976-14.555c0.902-4.483,0.817-8.777,0.817-13.348 c0-1.99-1.793-3.432-1.793-5.245c0-1.622-0.109-1.501,1.513-1.501c1.221,0,2.442,0,3.663,0c1.786,0,2.619,3.654,3.009,4.816 c0.89,2.656,0.387,3.848-0.313,6.631c-1.037,4.126-0.705,8.287-0.705,12.534c0,2.974-0.73,6.633,0.629,9.335 c1.777,3.535,2.955,5.53,2.955,9.439c1.578-1.571,1.79-1.736,1.79-3.942c0-1.44,0.326-2.266,0.84-3.628 c1.505-3.991,3.01-7.982,4.515-11.973c1.162-3.08,3.646-6.064,5.352-8.889c1.625-2.694,5.953-3.542,7.77-6.251 c1.801-2.686,3.934-5.43,4.974-8.538c0.492-1.473,1.633-3.478,1.633-5.031c0-1.017-0.587-4.612,0.101-5.295 c2.085-2.071,5.545-4.504,7.068-7.027c0.265-0.438-0.369-1.597,0.154-1.857c0.955-0.475,1.911-0.95,2.867-1.425 c1.043-0.519,0.56-2.74,0.56-3.844c-0.571,2.25,1.817,3.59,3.211,4.975c1.282,1.274,1.915,3.434,2.732,5.061 c1.122,2.233,2.244,3.451,4.033,5.23c1.633,1.623,3.825-0.283,4.923,1.897c1.4,2.782,0.938,2.718-1.197,4.844 c-1.428,1.421-3.801,2.997-4.744,4.717c-2.277,4.153-1.691,8.382,0,12.473c0.744,1.799,1.933,2.869,1.542,4.809 c-0.511,2.537-0.871,5.161-1.542,7.66c-0.367,1.369-0.881,4.441-1.869,5.424c-1.586,1.577-4.203,3.333-5.296,5.268 c-1.02,1.804-1.186,4.714-1.693,6.732c-0.493,1.958-2.489,3.961-3.61,5.633c-0.391,0.583-0.087,5.449,0.128,5.449 c2.39,0,4.61-0.563,6.336,1.155c2.698,2.687-1.358,7.753-4.362,7.753c-2.296,0-3.965-0.608-3.965-3.183 c0-2.476-1.25-3.426-1.791-5.726c-0.382-1.622,0.672-4.01-0.077-5.497c-1.499-2.978-1.257-3.409-4.587-3.409 c-1.846,0,0.283,10.246-4.295,8.906c1.371,1.364,4.665,3.577,5.374,5.346c0.111,0.277,0.183,3.374,0,3.563 c-0.247,0.256-2.709,0-3.188,0C236.221,98.197,230.118,98.197,224.015,98.197" id="path9" style="fill-rule:evenodd;clip-rule:evenodd;fill:#BFCCCC;"/>
<path d="M344.053,98.197c0.947-0.941,3.582-2.774,3.582-4.118 c0-2.358,0.196-4.302-0.676-6.47c-1.887-4.691-3.367-9.058-4.599-13.958c-0.872-3.465-5.189-7.988-7.195-10.98 c-1.217-1.816-2.044-4.029-3.026-5.981c-0.962-1.913-2.595-3.207-4.109-4.714c-1.247-1.241-1.83-4.396-2.48-6.013 c-0.788-1.96-1.395-3.751-1.91-5.799c-1.116-4.438-1.087-8.482-1.087-13.057c0-2.077,0.298-4.332-0.211-6.358 c-0.56-2.229-1.578-4.683-1.578-6.992c0-1.606-0.589-4.976,0-6.419c0.318-0.781,1.789-1.152,1.789-2.06 c0-1.699-0.376-1.877-1.603-3.1c-0.388-0.386-1.524-1.968-1.979-1.968c-0.39,0-1.793,1.643-1.793,2.061 c0,1.501-0.085,1.588-1.16,2.658c-1.043,1.036-1.479-0.217-2.422-1.155c-0.48-0.478-1.791-1.333-1.791-2.06 c0-1.623,0.11-1.504-1.512-1.504c-0.574,0,0.048,5.02-0.911,5.973c-2.127,2.113-8.13,5.377-11.102,4.392 c-4.4-1.459-8.493-3.237-13.152-3.237c-0.444,0-1.99-0.221-1.99,0.197c0,0.908-0.339,2.534,0,3.365 c0.319,0.782,1.792,1.153,1.792,2.062c0,1.234,0.146,1.938,0.538,3.108c0.819,2.443,1.254,4.037,1.254,6.595 c0,2.384,2.536,2.489,4.293,2.489c2.707,0,3.858,0.49,6.302,1.706c1.285,0.639,4.903,2.412,5.529,3.638c0.604,1.184,0,4.822,0,6.237 c0,2.486,0,4.973,0,7.459c0,4.899-3.103,7.443-7.014,9.386c-1.362,0.677-4.721,0.077-6.16,0.077c-1.79,0-3.804,2.044-4.742,3.565 c-0.91,1.476-0.667,4.225-1.893,5.443c-1.726,1.715-3.292,3.08-4.379,5.245c-0.496,0.989-0.895,1.586-0.895,2.673 c0,1.369,0.567,0.8,1.789,0.892c1.867,0.14,4.647,0.392,5.419-1.908c0.498-1.485,0.861-4.776,2.31-5.497 c2.559-1.273,3.741-1.504,6.606-1.504c2.349,0,4.697,0,7.046,0c1.98,0,2.336,3.894,2.572,5.07c1.015,5.046,1.13,9.467,1.13,14.639 c0,1.987-0.612,3.498-1.252,5.408c-0.329,0.981-0.45,1.518-1.169,2.233c-1.38,1.374-0.467,1.458-1.16,2.938 c-0.298,0.637-1.288,1.278-1.793,1.779c1.983,1.971,2.87,3.563,5.699,3.563c3.476,0,6.95,0,10.426,0 c-1.171-1.745-2.341-3.491-3.512-5.236c-0.336-0.501,2.819-4.42,3.246-5.057c0.872-1.302,0.266-4.173,0.266-5.681 c0-2.687-0.582-3.333,1.792-4.514c1.082-0.538,3.339-2.797,4.144-2.396c2.842,1.415,3.022,1.196,3.022,4.362 c0,3.799,0,7.598,0,11.396c-1.239-1.232-1.35-2.004-2.926-1.219c-2.177,1.083-2.198,0.784-2.448,3.002 c-0.291,2.578,0.057,5.342,3.082,5.342C329.386,98.197,336.72,98.197,344.053,98.197" id="path11" style="fill-rule:evenodd;clip-rule:evenodd;fill:#663333;"/>
<path d="M361.97,98.197c-1.129,0-2.257,0-3.386,0 c-0.511,0-0.036-1.459-0.244-1.872c-1.164-2.315-2.328-4.63-3.492-6.945c-0.921-1.83-1.126-4.388-1.625-6.375 c-0.504-2.001-2.851-2.679-3.796-4.403c-2.03-3.701-1.792-8.902-1.792-12.956c0-5.111,0.529-9.274,1.541-14.302 c0.399-1.987,0.251-3.996,0.251-6.022c0-1.546,0.576-4.769-0.077-6.068c-0.191-0.38-2.831-5.19-1.435-5.19 c2.363,0,4.525-0.567,6.256,1.153c3.617,3.594,1.775,8.547,0.73,12.705c-0.971,3.86-0.1,8.88-0.1,12.925 c0,3.21-0.147,4.991,1.262,7.793c1.6,3.181,2.322,4.661,2.322,8.18c2.112-2.102,1.454-2.488,1.792-5.343 c0.265-2.236,1.144-4.551,1.691-6.731c0.611-2.433,1.223-4.866,1.835-7.299c0.42-1.673,2.834-3.676,3.896-4.995 c3.147-3.912,6.358-6.396,10.414-9.42c2.658-1.982,4.948-7.459,5.992-10.574c0.797-2.375,1.254-3.935,1.254-6.413 c0-3.181,0.914-3.582,3.21-5.864c1.068-1.063,3.325-2.588,3.956-3.936c0.493-1.054-0.307-1.476,0.631-2.407 c1.383-1.374,0.468-1.455,1.161-2.937c2.337-4.996,6.122,5.049,7.088,6.973c1.087,2.162-0.837,3.111,1.471,4.641 c2.693,1.786,3.678,2.64,6.854,2.64c1.417,0,2.883,3.189,1.874,4.189c-1.078,1.07-1.163,1.156-1.163,2.658 c0,0.678-1.98,1.263-2.521,1.532c-1.544,0.768-4.642,1.382-4.642,3.272c0,2.313-0.414,4.926,0.326,7.14 c0.71,2.12,1.356,4.157,2.357,6.15c1.209,2.405,0.459,3.955-0.078,6.627c-0.921,4.58-3.159,7.556-5.748,11.417 c-2.377,3.545-4.781,7.371-6.145,11.437c-0.731,2.181-1.465,3.965-1.465,6.249c0,0.502-0.356,3.121,0,3.463 c0.282,0.271,2.729,0,3.201,0c2.377,0,3.966,0.656,3.966,3.288c0,0.778,0,1.558,0,2.336c0,2.395-0.245,0.688-1.794,1.503 c-1.851,0.974-2.662,2.881-5.373,1.781c-2.87-1.164-0.909-3.584-1.869-5.495c-1.356-2.7-1.715-3.863-1.715-6.876 c0-1.198-0.594-5.443-2.07-5.443c-1.82,0-4.335,1.775-5.096,3.563c-0.739,1.736,1.638,6.333-1.79,5.344 c1.026,1.022,5.374,4.263,5.374,5.624c0,0.493,0.177,3.284-0.198,3.284c-1.452,0-2.903,0-4.354,0 C374.461,98.197,368.216,98.197,361.97,98.197" id="path13" style="fill-rule:evenodd;clip-rule:evenodd;fill:#191919;"/>
</svg>
Your code is not SVG compliant, there should be spaces between two numbers, i.e.: 100 -100.
The SVG parser of Batik throws an exception because of this.