SVG conversion bug

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ozby
Posts: 2
Joined: 2017-02-24T10:10:18-07:00
Authentication code: 1151

SVG conversion bug

Post by ozby »

Hello,
I have been using imagemagick for a while, since i have upgraded to 6.9.6, my charts which uses opacity (which are created as svg and then converted to png via imagemagick) are not appearing in a right way (it also doesnt work 7.0.5). After spending sometime, i realized it caused when the fill is set before opacity in the svgs. The other converter tools seems to produce same png out of both svgs below.

converting the svg below to png via imagemagick is not returning expected png.
style="fill: #999999; opacity: 0.1;" (doesn't take opacity into consideration)

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1170" height="150"><g transform="translate(60,20)" style="font-family: arial, sans-serif; font-size: 11px;"><g class="x axis" transform="translate(0,110)"><g class="tick" style="opacity: 1;" transform="translate(3.0219780219780223,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">02 Jan</text></g><g class="tick" style="opacity: 1;" transform="translate(87.63736263736263,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">30 Jan</text></g><g class="tick" style="opacity: 1;" transform="translate(172.25274725274724,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">27 Feb</text></g><g class="tick" style="opacity: 1;" transform="translate(256.86813186813185,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">27 Mar</text></g><g class="tick" style="opacity: 1;" transform="translate(341.4835164835165,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">24 Apr</text></g><g class="tick" style="opacity: 1;" transform="translate(426.09890109890114,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">22 May</text></g><g class="tick" style="opacity: 1;" transform="translate(510.7142857142857,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">19 Jun</text></g><g class="tick" style="opacity: 1;" transform="translate(595.3296703296703,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">17 Jul</text></g><g class="tick" style="opacity: 1;" transform="translate(679.945054945055,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">14 Aug</text></g><g class="tick" style="opacity: 1;" transform="translate(764.5604395604395,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">11 Sep</text></g><g class="tick" style="opacity: 1;" transform="translate(849.1758241758242,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">09 Oct</text></g><g class="tick" style="opacity: 1;" transform="translate(933.7912087912088,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">06 Nov</text></g><g class="tick" style="opacity: 1;" transform="translate(1018.4065934065934,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">04 Dec</text></g><path class="domain" d="M0,6V0H1100V6" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></path></g><g class="y axis"><g class="tick" style="opacity: 1;" transform="translate(0,95.9210720652496)"><line x2="1100" y2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".32em" style="text-anchor: end; fill: #777;" x="-3" y="0">500k</text></g><g class="tick" style="opacity: 1;" transform="translate(0,44.180471215763006)"><line x2="1100" y2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".32em" style="text-anchor: end; fill: #777;" x="-3" y="0">1M</text></g><path class="domain" d="M0,0H0V110H0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none; display: none;"></path></g><path class="area" d="M0,107.34105052234489L3.0219780219780223,68.52701094548893L6.043956043956045,45.116044760323426L9.065934065934066,39.80973569960348L12.08791208791209,42.10898452015297L15.10989010989011,55.886575195555956L18.13186813186813,86.81741682698413L21.153846153846153,80.54500726720258L24.17582417582418,31.799152394884263L27.197802197802197,26.13945503036233L30.21978021978022,27.46980935940433L33.24175824175824,30.557584936899985L36.26373626373626,45.25377823978476L39.285714285714285,86.05196637801683L42.30769230769231,77.70569005498615L45.32967032967033,30.298261045442356L48.35164835164836,21.11668446229756L51.37362637362637,21.221717882022023L54.395604395604394,24.734697717298765L57.41758241758242,41.575435444193054L60.43956043956044,82.72535618699993L63.46153846153847,73.58123979887017L66.48351648351648,15.632698178260487L69.5054945054945,14.539419282310824L72.52747252747253,19.494927069271252L75.54945054945055,27.996528676052094L78.57142857142857,34.90100141581099L81.5934065934066,78.01095959999813L84.61538461538461,69.02785996171195L87.63736263736263,8.235861880817883L90.65934065934066,4.562279220504335L93.68131868131869,7.857948532213225L96.70329670329672,8.379183345170953L99.72527472527472,26.72298552674284L102.74725274725274,73.23799265283468L105.76923076923077,63.88360246285259L108.79120879120879,4.136247113109658L111.81318681318682,0L114.83516483516485,8.776861603300116L117.85714285714285,13.603742256548713L120.87912087912088,31.441107437005822L123.9010989010989,80.10779919002441L126.92307692307693,70.37290862139521L129.94505494505495,13.47004454395364L132.96703296703296,18.91512189615191L135.989010989011,18.158260386925615L139.010989010989,18.55583516385307L142.03296703296704,37.37213251238247L145.05494505494505,79.37442791358379L148.07692307692307,77.5698192371554L148.07692307692307,110L145.05494505494505,110L142.03296703296704,110L139.010989010989,110L135.989010989011,110L132.96703296703296,110L129.94505494505495,110L126.92307692307693,110L123.9010989010989,110L120.87912087912088,110L117.85714285714285,110L114.83516483516485,110L111.81318681318682,110L108.79120879120879,110L105.76923076923077,110L102.74725274725274,110L99.72527472527472,110L96.70329670329672,110L93.68131868131869,110L90.65934065934066,110L87.63736263736263,110L84.61538461538461,110L81.5934065934066,110L78.57142857142857,110L75.54945054945055,110L72.52747252747253,110L69.5054945054945,110L66.48351648351648,110L63.46153846153847,110L60.43956043956044,110L57.41758241758242,110L54.395604395604394,110L51.37362637362637,110L48.35164835164836,110L45.32967032967033,110L42.30769230769231,110L39.285714285714285,110L36.26373626373626,110L33.24175824175824,110L30.21978021978022,110L27.197802197802197,110L24.17582417582418,110L21.153846153846153,110L18.13186813186813,110L15.10989010989011,110L12.08791208791209,110L9.065934065934066,110L6.043956043956045,110L3.0219780219780223,110L0,110Z" style="fill: #999999; opacity: 0.1;"></path><path class="line current" d="M0,107.34105052234489L3.0219780219780223,68.52701094548893L6.043956043956045,45.116044760323426L9.065934065934066,39.80973569960348L12.08791208791209,42.10898452015297L15.10989010989011,55.886575195555956L18.13186813186813,86.81741682698413L21.153846153846153,80.54500726720258L24.17582417582418,31.799152394884263L27.197802197802197,26.13945503036233L30.21978021978022,27.46980935940433L33.24175824175824,30.557584936899985L36.26373626373626,45.25377823978476L39.285714285714285,86.05196637801683L42.30769230769231,77.70569005498615L45.32967032967033,30.298261045442356L48.35164835164836,21.11668446229756L51.37362637362637,21.221717882022023L54.395604395604394,24.734697717298765L57.41758241758242,41.575435444193054L60.43956043956044,82.72535618699993L63.46153846153847,73.58123979887017L66.48351648351648,15.632698178260487L69.5054945054945,14.539419282310824L72.52747252747253,19.494927069271252L75.54945054945055,27.996528676052094L78.57142857142857,34.90100141581099L81.5934065934066,78.01095959999813L84.61538461538461,69.02785996171195L87.63736263736263,8.235861880817883L90.65934065934066,4.562279220504335L93.68131868131869,7.857948532213225L96.70329670329672,8.379183345170953L99.72527472527472,26.72298552674284L102.74725274725274,73.23799265283468L105.76923076923077,63.88360246285259L108.79120879120879,4.136247113109658L111.81318681318682,0L114.83516483516485,8.776861603300116L117.85714285714285,13.603742256548713L120.87912087912088,31.441107437005822L123.9010989010989,80.10779919002441L126.92307692307693,70.37290862139521L129.94505494505495,13.47004454395364L132.96703296703296,18.91512189615191L135.989010989011,18.158260386925615L139.010989010989,18.55583516385307L142.03296703296704,37.37213251238247L145.05494505494505,79.37442791358379L148.07692307692307,77.5698192371554" style="fill: none; stroke: #999999; stroke-width: 1px; opacity: 1;"></path><path class="average-line current" d="M21.153846153846153,63.65811692435054L24.17582417582418,59.83011074504449L27.197802197802197,54.58327380924382L30.21978021978022,51.87233241924938L33.24175824175824,50.10948579922094L36.26373626373626,48.45928585875623L39.285714285714285,46.940314865074626L42.30769230769231,46.83096480093644L45.32967032967033,46.42534805633409L48.35164835164836,46.21093500641383L51.37362637362637,45.49339635383315L54.395604395604394,44.60081185706423L57.41758241758242,43.768970825692634L60.43956043956044,43.24349328346524L63.46153846153847,42.76826325617712L66.48351648351648,42.17905607673198L69.5054945054945,40.083975667134574L72.52747252747253,39.1443663557079L75.54945054945055,38.897681953886355L78.57142857142857,39.363657805136825L81.5934065934066,38.41016722965369L84.61538461538461,37.73668200293912L87.63736263736263,37.086199169059384L90.65934065934066,36.029508269424745L93.68131868131869,34.6042025463095L96.70329670329672,32.9417770410155L99.72527472527472,30.139299136603906L102.74725274725274,28.971011152451325L105.76923076923077,28.289158731427964L108.79120879120879,27.554264803019517L111.81318681318682,26.96860555048975L114.83516483516485,26.316851376131993L117.85714285714285,26.44812467200154L120.87912087912088,27.194490230769805L123.9010989010989,27.868507646521643L126.92307692307693,28.84990858040591L129.94505494505495,29.77695231734056L132.96703296703296,31.110351950318275L135.989010989011,33.81251222119712L139.010989010989,35.15271204742933L142.03296703296704,35.86015389132994L145.05494505494505,36.707443187812345L148.07692307692307,36.602675862606525" style="fill: none; stroke: #999999; stroke-width: 2px;"></path><circle cx="0" cy="107.34105052234489" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #ffffff;"></circle><circle cx="21.153846153846153" cy="80.54500726720258" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #006d2c;"></circle><circle cx="42.30769230769231" cy="77.70569005498615" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #f7fcf5;"></circle><circle cx="63.46153846153847" cy="73.58123979887017" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #e5f5e0;"></circle><circle cx="84.61538461538461" cy="69.02785996171195" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #e5f5e0;"></circle><circle cx="105.76923076923077" cy="63.88360246285259" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #e5f5e0;"></circle><circle cx="126.92307692307693" cy="70.37290862139521" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #fee0d2;"></circle><circle cx="148.07692307692307" cy="77.5698192371554" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #fcbba1;"></circle><path class="average-line previous" d="M1030.4945054945056,38.70279728502956L1033.5164835164835,39.731503911119056L1036.5384615384614,40.32770346319328L1039.5604395604396,40.79617764631336L1042.5824175824175,41.691201342836585L1045.6043956043954,43.107932909239594L1048.6263736263736,43.93783736383654L1051.6483516483518,44.88303466015496L1054.6703296703297,45.55575116937118L1057.6923076923076,46.81377213842559L1060.7142857142858,47.922972356408074L1063.7362637362637,49.38971490928932L1066.7582417582419,51.490146775317456L1069.7802197802198,54.36059704621646L1072.8021978021977,57.68058444032462L1075.8241758241759,61.560434701681835L1078.8461538461538,65.88217926035131L1081.8681318681317,68.33135755913379L1084.89010989011,71.87672701054231L1087.912087912088,78.45493830437314L1090.934065934066,82.70052069859219L1093.956043956044,85.69012218173314L1096.978021978022,87.46945187888937L1100,87.65908857251715" stroke-dasharray="3,2" style="fill: none; stroke: #999999; stroke-width: 1.5px; opacity: 0.6;"></path></g></svg>
When i swap the opacity and fill attributes as below, imagemagick converter returns expected png.
style="opacity: 0.1; fill: #999999;"

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1170" height="150"><g transform="translate(60,20)" style="font-family: arial, sans-serif; font-size: 11px;"><g class="x axis" transform="translate(0,110)"><g class="tick" style="opacity: 1;" transform="translate(3.0219780219780223,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">02 Jan</text></g><g class="tick" style="opacity: 1;" transform="translate(87.63736263736263,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">30 Jan</text></g><g class="tick" style="opacity: 1;" transform="translate(172.25274725274724,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">27 Feb</text></g><g class="tick" style="opacity: 1;" transform="translate(256.86813186813185,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">27 Mar</text></g><g class="tick" style="opacity: 1;" transform="translate(341.4835164835165,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">24 Apr</text></g><g class="tick" style="opacity: 1;" transform="translate(426.09890109890114,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">22 May</text></g><g class="tick" style="opacity: 1;" transform="translate(510.7142857142857,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">19 Jun</text></g><g class="tick" style="opacity: 1;" transform="translate(595.3296703296703,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">17 Jul</text></g><g class="tick" style="opacity: 1;" transform="translate(679.945054945055,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">14 Aug</text></g><g class="tick" style="opacity: 1;" transform="translate(764.5604395604395,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">11 Sep</text></g><g class="tick" style="opacity: 1;" transform="translate(849.1758241758242,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">09 Oct</text></g><g class="tick" style="opacity: 1;" transform="translate(933.7912087912088,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">06 Nov</text></g><g class="tick" style="opacity: 1;" transform="translate(1018.4065934065934,0)"><line y2="6" x2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".71em" style="text-anchor: middle; fill: #777;" y="9" x="0">04 Dec</text></g><path class="domain" d="M0,6V0H1100V6" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></path></g><g class="y axis"><g class="tick" style="opacity: 1;" transform="translate(0,95.9210720652496)"><line x2="1100" y2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".32em" style="text-anchor: end; fill: #777;" x="-3" y="0">500k</text></g><g class="tick" style="opacity: 1;" transform="translate(0,44.180471215763006)"><line x2="1100" y2="0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none;"></line><text dy=".32em" style="text-anchor: end; fill: #777;" x="-3" y="0">1M</text></g><path class="domain" d="M0,0H0V110H0" style="stroke: rgba(0,0,0,0.09); shape-rendering: crispEdges; fill: none; display: none;"></path></g><path class="area" d="M0,107.34105052234489L3.0219780219780223,68.52701094548893L6.043956043956045,45.116044760323426L9.065934065934066,39.80973569960348L12.08791208791209,42.10898452015297L15.10989010989011,55.886575195555956L18.13186813186813,86.81741682698413L21.153846153846153,80.54500726720258L24.17582417582418,31.799152394884263L27.197802197802197,26.13945503036233L30.21978021978022,27.46980935940433L33.24175824175824,30.557584936899985L36.26373626373626,45.25377823978476L39.285714285714285,86.05196637801683L42.30769230769231,77.70569005498615L45.32967032967033,30.298261045442356L48.35164835164836,21.11668446229756L51.37362637362637,21.221717882022023L54.395604395604394,24.734697717298765L57.41758241758242,41.575435444193054L60.43956043956044,82.72535618699993L63.46153846153847,73.58123979887017L66.48351648351648,15.632698178260487L69.5054945054945,14.539419282310824L72.52747252747253,19.494927069271252L75.54945054945055,27.996528676052094L78.57142857142857,34.90100141581099L81.5934065934066,78.01095959999813L84.61538461538461,69.02785996171195L87.63736263736263,8.235861880817883L90.65934065934066,4.562279220504335L93.68131868131869,7.857948532213225L96.70329670329672,8.379183345170953L99.72527472527472,26.72298552674284L102.74725274725274,73.23799265283468L105.76923076923077,63.88360246285259L108.79120879120879,4.136247113109658L111.81318681318682,0L114.83516483516485,8.776861603300116L117.85714285714285,13.603742256548713L120.87912087912088,31.441107437005822L123.9010989010989,80.10779919002441L126.92307692307693,70.37290862139521L129.94505494505495,13.47004454395364L132.96703296703296,18.91512189615191L135.989010989011,18.158260386925615L139.010989010989,18.55583516385307L142.03296703296704,37.37213251238247L145.05494505494505,79.37442791358379L148.07692307692307,77.5698192371554L148.07692307692307,110L145.05494505494505,110L142.03296703296704,110L139.010989010989,110L135.989010989011,110L132.96703296703296,110L129.94505494505495,110L126.92307692307693,110L123.9010989010989,110L120.87912087912088,110L117.85714285714285,110L114.83516483516485,110L111.81318681318682,110L108.79120879120879,110L105.76923076923077,110L102.74725274725274,110L99.72527472527472,110L96.70329670329672,110L93.68131868131869,110L90.65934065934066,110L87.63736263736263,110L84.61538461538461,110L81.5934065934066,110L78.57142857142857,110L75.54945054945055,110L72.52747252747253,110L69.5054945054945,110L66.48351648351648,110L63.46153846153847,110L60.43956043956044,110L57.41758241758242,110L54.395604395604394,110L51.37362637362637,110L48.35164835164836,110L45.32967032967033,110L42.30769230769231,110L39.285714285714285,110L36.26373626373626,110L33.24175824175824,110L30.21978021978022,110L27.197802197802197,110L24.17582417582418,110L21.153846153846153,110L18.13186813186813,110L15.10989010989011,110L12.08791208791209,110L9.065934065934066,110L6.043956043956045,110L3.0219780219780223,110L0,110Z" style="opacity: 0.1; fill: #999999;"></path><path class="line current" d="M0,107.34105052234489L3.0219780219780223,68.52701094548893L6.043956043956045,45.116044760323426L9.065934065934066,39.80973569960348L12.08791208791209,42.10898452015297L15.10989010989011,55.886575195555956L18.13186813186813,86.81741682698413L21.153846153846153,80.54500726720258L24.17582417582418,31.799152394884263L27.197802197802197,26.13945503036233L30.21978021978022,27.46980935940433L33.24175824175824,30.557584936899985L36.26373626373626,45.25377823978476L39.285714285714285,86.05196637801683L42.30769230769231,77.70569005498615L45.32967032967033,30.298261045442356L48.35164835164836,21.11668446229756L51.37362637362637,21.221717882022023L54.395604395604394,24.734697717298765L57.41758241758242,41.575435444193054L60.43956043956044,82.72535618699993L63.46153846153847,73.58123979887017L66.48351648351648,15.632698178260487L69.5054945054945,14.539419282310824L72.52747252747253,19.494927069271252L75.54945054945055,27.996528676052094L78.57142857142857,34.90100141581099L81.5934065934066,78.01095959999813L84.61538461538461,69.02785996171195L87.63736263736263,8.235861880817883L90.65934065934066,4.562279220504335L93.68131868131869,7.857948532213225L96.70329670329672,8.379183345170953L99.72527472527472,26.72298552674284L102.74725274725274,73.23799265283468L105.76923076923077,63.88360246285259L108.79120879120879,4.136247113109658L111.81318681318682,0L114.83516483516485,8.776861603300116L117.85714285714285,13.603742256548713L120.87912087912088,31.441107437005822L123.9010989010989,80.10779919002441L126.92307692307693,70.37290862139521L129.94505494505495,13.47004454395364L132.96703296703296,18.91512189615191L135.989010989011,18.158260386925615L139.010989010989,18.55583516385307L142.03296703296704,37.37213251238247L145.05494505494505,79.37442791358379L148.07692307692307,77.5698192371554" style="fill: none; stroke: #999999; stroke-width: 1px; opacity: 1;"></path><path class="average-line current" d="M21.153846153846153,63.65811692435054L24.17582417582418,59.83011074504449L27.197802197802197,54.58327380924382L30.21978021978022,51.87233241924938L33.24175824175824,50.10948579922094L36.26373626373626,48.45928585875623L39.285714285714285,46.940314865074626L42.30769230769231,46.83096480093644L45.32967032967033,46.42534805633409L48.35164835164836,46.21093500641383L51.37362637362637,45.49339635383315L54.395604395604394,44.60081185706423L57.41758241758242,43.768970825692634L60.43956043956044,43.24349328346524L63.46153846153847,42.76826325617712L66.48351648351648,42.17905607673198L69.5054945054945,40.083975667134574L72.52747252747253,39.1443663557079L75.54945054945055,38.897681953886355L78.57142857142857,39.363657805136825L81.5934065934066,38.41016722965369L84.61538461538461,37.73668200293912L87.63736263736263,37.086199169059384L90.65934065934066,36.029508269424745L93.68131868131869,34.6042025463095L96.70329670329672,32.9417770410155L99.72527472527472,30.139299136603906L102.74725274725274,28.971011152451325L105.76923076923077,28.289158731427964L108.79120879120879,27.554264803019517L111.81318681318682,26.96860555048975L114.83516483516485,26.316851376131993L117.85714285714285,26.44812467200154L120.87912087912088,27.194490230769805L123.9010989010989,27.868507646521643L126.92307692307693,28.84990858040591L129.94505494505495,29.77695231734056L132.96703296703296,31.110351950318275L135.989010989011,33.81251222119712L139.010989010989,35.15271204742933L142.03296703296704,35.86015389132994L145.05494505494505,36.707443187812345L148.07692307692307,36.602675862606525" style="fill: none; stroke: #999999; stroke-width: 2px;"></path><circle cx="0" cy="107.34105052234489" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #ffffff;"></circle><circle cx="21.153846153846153" cy="80.54500726720258" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #006d2c;"></circle><circle cx="42.30769230769231" cy="77.70569005498615" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #f7fcf5;"></circle><circle cx="63.46153846153847" cy="73.58123979887017" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #e5f5e0;"></circle><circle cx="84.61538461538461" cy="69.02785996171195" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #e5f5e0;"></circle><circle cx="105.76923076923077" cy="63.88360246285259" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #e5f5e0;"></circle><circle cx="126.92307692307693" cy="70.37290862139521" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #fee0d2;"></circle><circle cx="148.07692307692307" cy="77.5698192371554" r="4" class="day-circle" style="stroke-width: 1px; stroke: rgba(0,0,0,0.3); fill: #fcbba1;"></circle><path class="average-line previous" d="M1030.4945054945056,38.70279728502956L1033.5164835164835,39.731503911119056L1036.5384615384614,40.32770346319328L1039.5604395604396,40.79617764631336L1042.5824175824175,41.691201342836585L1045.6043956043954,43.107932909239594L1048.6263736263736,43.93783736383654L1051.6483516483518,44.88303466015496L1054.6703296703297,45.55575116937118L1057.6923076923076,46.81377213842559L1060.7142857142858,47.922972356408074L1063.7362637362637,49.38971490928932L1066.7582417582419,51.490146775317456L1069.7802197802198,54.36059704621646L1072.8021978021977,57.68058444032462L1075.8241758241759,61.560434701681835L1078.8461538461538,65.88217926035131L1081.8681318681317,68.33135755913379L1084.89010989011,71.87672701054231L1087.912087912088,78.45493830437314L1090.934065934066,82.70052069859219L1093.956043956044,85.69012218173314L1096.978021978022,87.46945187888937L1100,87.65908857251715" stroke-dasharray="3,2" style="fill: none; stroke: #999999; stroke-width: 1.5px; opacity: 0.6;"></path></g></svg>
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG conversion bug

Post by fmw42 »

What is your IM version and platform/OS? What command did you use? What SVG renderer and version are you using -- Inkscape, RSVG or IM internal MSVG (XML). You can see from

convert -list format?

Add -verbose to your command it should tell you which renderer was used.


Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

For novices, see

viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
ozby
Posts: 2
Joined: 2017-02-24T10:10:18-07:00
Authentication code: 1151

Re: SVG conversion bug

Post by ozby »

Platform, i have tried it in ubuntu(Ubuntu 14.04.5 LTS) and macosx (10.12.3).
SVG Scalable Vector Graphics (XML 2.9.1)
Imagemagick version 6.9 to 7.0.5.1 beta all versions i have tried had it.

convert x.svg y.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG conversion bug

Post by fmw42 »

XML indicates you are using the least accurate IM internal MSVG. I would suggest you install Inkscape or RSVG, which are better SVG renderers. But I am not an SVG expert, so I have limites experience and one of the other people on the forum may be able to help further.

What was your exact command line? Can you provide an SVG file and a proper rendering to png and a png that is incorrect and explain what is wrong? You can upload to some free hosting service such as dropbox.com and put the URLs here.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: SVG conversion bug

Post by fmw42 »

Converting your two svg files to png in IM 6.9.7.9 Q16 Mac OSX with RSVG 2.40.16 gives me identical results from a compare -metric rmse. The image I get is

Image
Post Reply