phantomjs stuck fetching SVG with base64 encoded pattern -
i using https://github.com/vidalab/banquo-server create png svg uses phantomjs.
i dont know if there problem phantomjs or svg why im posting here , not on github (quicker response too).
<?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" id="creator-svg" width="488" height="350"> <desc>created snap</desc> <defs> <pattern x="0" y="0" width="20" height="20" patternunits="userspaceonuse" id="patternsibdh4mpauu" viewbox="0 0 20 20"> <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/svg+xml;base64,phn2zyb4bwxucz0iahr0cdovl3d3dy53my5vcmcvmjawmc9zdmciihdpzhropsixnsigagvpz2h0psixnsi+cjxyzwn0ihdpzhropsi1mcigagvpz2h0psi1mcigzmlsbd0iizi4mjgyoci+pc9yzwn0pgo8y2lyy2xlign4psiziibjet0inc4ziibypsixljgiigzpbgw9iimzotm5mzkipjwvy2lyy2xlpgo8y2lyy2xlign4psiziibjet0imyigcj0ims44iibmawxspsjibgfjayi+pc9jaxjjbgu+cjxjaxjjbgugy3g9ijewljuiign5psixmi41iibypsixljgiigzpbgw9iimzotm5mzkipjwvy2lyy2xlpgo8y2lyy2xlign4psixmc41iibjet0imteumyigcj0ims44iibmawxspsjibgfjayi+pc9jaxjjbgu+cjwvc3znpg==" preserveaspectratio="none" x="0" y="0" width="20" height="20"/> </pattern> </defs> <g> <circle cx="244" cy="178" r="140" fill="url('#patternsibdh4mpauu')" stroke="#cdcdcd" style="stroke-width: 1px;"/> <circle cx="244" cy="178" r="120" fill="url('#patternsibdh4mpauu')" stroke="#cdcdcd" style="stroke-width: 1px;"/> </g> <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://enterprise.app/badge-builder/resize/bet.png" preserveaspectratio="none" x="140" y="140" width="300" height="298" transform="matrix(0.3733,-0.1067,0.1067,0.3733,125.9067,129.04)" class="" style="touch-action: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); opacity: 0.6;"/> </svg>
is svg code. works in browsers, no errors.
after banquo server failing went phantomjs docs , picked rasterize.js script , tested terminal, example svg works, mine doesn't. started stripping bits out , infact base64encoded patterns causing problem.
does know if svg format incorrect or phantomjs has problems base64encoded format?
regards
edit:
removed base64encoded pattern , changed file path, still not working. delete contents of file , works...
<?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15"> <rect width="50" height="50" fill="#282828"/> <circle cx="3" cy="4.3" r="1.8" fill="#393939"/> <circle cx="3" cy="3" r="1.8" fill="black"/> <circle cx="10.5" cy="12.5" r="1.8" fill="#393939" /> <circle cx="10.5" cy="11.3" r="1.8" fill="black"/> </svg>
is file contents pattern
edit 2:
started removing bits of pattern svg , run if xmlns="http://www.w3.org/2000/svg"
removed image not display...
Comments
Post a Comment