Unable to generate PNG from SVG
Posted: 2019-07-21T07:57:01-07:00
Hi,
I am trying to generate PNG for below SVG but i am getting Exception while reading the SVG readImageBlob as Memory allocation failed.
I tried this "ini_set('memory_limit','17M');" but of no use. I am pasting the code with the SVG below.
Thanks in Advance
I am trying to generate PNG for below SVG but i am getting Exception while reading the SVG readImageBlob as Memory allocation failed.
I tried this "ini_set('memory_limit','17M');" but of no use. I am pasting the code with the SVG below.
Code: Select all
<?php
$svg='<?xml version="1.0"?>
<svg version="1.1" width="512px" height="512px" viewBox="0 0 512 512" >
<g>
<g>
<g>
<path fill="#F6851F" d="M304.1,321.9c-1.8-8.5-4.1-16.9-7-25.1c-5.1,1.9-10.1,3.8-15.2,5.5c-42.5,14.7-87.2,28.2-132.4,31.1
c-34.8,2.3-74.3-2.2-99.2-28c5.4,35.1,20.4,68.6,43.7,96.4c2.9,3.5,6,6.9,9.2,10.2c0,0,0-0.1,0.1-0.1c0.9-1.1,2.3-1.7,3.7-1.9
c1.5-0.1,2.9,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7v1.5c0,1.4-0.3,2.6-1.1,3.7c7.2,6.6,15,12.7,23.1,18.1c-0.1-1.5,0.4-2.9,1.4-4
c0.9-1,2.3-1.9,3.7-1.9h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7c0.1,1.5-0.4,2.9-1.4,4.1c-0.7,0.8-1.9,1.6-3.1,1.8
c1.9,1.1,3.7,2.2,5.6,3.2c21.8,11.7,45.5,18.4,70,21.6c20.8,2.7,42,2.8,62.8,0.2c14.8-20.4,22.4-43.8,24.9-69
C308.8,373.6,309.4,347.5,304.1,321.9z M72.5,333.7c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4
c-1.1-0.9-1.7-2.3-1.9-3.7c-0.1-1.5,0.4-2.9,1.4-4.1c0.9-1,2.3-1.9,3.7-1.9H68c1.5,0,2.9,0.3,4.1,1.4c1.1,0.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1,0.9,1.7,2.3,1.9,3.7C179,443.7,178.5,445.1,177.5,446.2z M182.8,415.1c-7.1,0-7.9-11-0.8-11
C189,404.1,189.9,415.1,182.8,415.1z M211.3,464.6c-7.1,0-7.9-11-0.8-11C217.5,453.6,218.4,464.6,211.3,464.6z M217.9,436.2
c0,1.5-0.3,2.9-1.4,4.1c-0.9,1.1-2.3,1.7-3.7,1.9c-1.5,0.1-2.9-0.4-4.1-1.4c-1-0.9-1.9-2.3-1.9-3.7v-1.5c0-1.5,0.3-2.9,1.4-4.1
c0.9-1.1,2.3-1.7,3.7-1.9c1.5-0.1,2.9,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7V436.2z M237.2,464.1c-0.2,0.9-0.7,2.3-1.4,3
c-1.1,0.9-1.1,1.1-2.4,1.6c-0.5,0.2-1.1,0.3-1.6,0.4c-0.3,0-0.6,0-0.9,0c-1.5,0-2.9-0.3-4.1-1.4c-1.1-0.9-1.7-2.3-1.9-3.7
c-0.1-1.5,0.4-3,1.4-4.1c0.3-0.3,0.7-0.7,1.1-0.9c0.1-0.2,0.3-0.4,0.4-0.6c0.9-1.1,2.3-1.7,3.7-1.9c1.5-0.1,3,0.4,4.1,1.4
c1,0.9,1.9,2.3,1.9,3.7C237.4,462.5,237.4,463.3,237.2,464.1z M236.8,412.1c-7.1,0-7.9-11-0.8-11
C243,401.1,243.9,412.1,236.8,412.1z M251.8,463.1c-7.1,0-7.9-11-0.8-11C258,452.1,258.9,463.1,251.8,463.1z M255.5,447.7
c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4c-1.1-0.9-1.7-2.3-1.9-3.7c-0.1-1.5,0.4-2.9,1.4-4.1c0.9-1,2.3-1.9,3.7-1.9
h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7C257,445.2,256.5,446.6,255.5,447.7z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M274.8,253.1c-15.6-22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,2.3-1.7,3.7-1.9c1.5-0.1,2.9,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7V283.2z M77,195.6c7.1,0,7.9,11,0.8,11
C70.8,206.6,69.9,195.6,77,195.6z M91.9,277.2c0,1.5-0.3,2.9-1.4,4.1c-0.9,1.1-2.3,1.7-3.7,1.9c-1.5,0.1-2.9-0.4-4.1-1.4
c-1-0.9-1.9-2.3-1.9-3.7v-1.5c0-1.5,0.3-2.9,1.4-4.1c0.9-1.1,2.3-1.7,3.7-1.9c1.5-0.1,2.9,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7
V277.2z M94.9,218.7c0,1.5-0.3,2.9-1.4,4.1c-0.9,1.1-2.3,1.7-3.7,1.9c-1.5,0.1-2.9-0.4-4.1-1.4c-1-0.9-1.9-2.3-1.9-3.7V218
c0-1.5,0.3-2.9,1.4-4.1c0.9-1.1,2.3-1.7,3.7-1.9c1.5-0.1,2.9,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7V218.7z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M354.7,251.6c-14-50.9-38.8-99.7-75.1-138.4c-32.3-34.3-79-65.8-126.8-43.4c-1.3,0.6-2.4,0.7-3.4,0.4
c-16.4,10.6-31.4,23.2-44.5,37.3c-22.1,23.7-39.6,52.2-48.1,83.2c27.2-18.2,58.7-29,91.9-26.2c34.8,2.9,67,19.3,94.5,40.1
c26.8,20.3,47.3,47.5,60.2,78.1c13.7-5.5,27.1-11.6,40-18.6c4.3-2.3,8.6-4.7,12.8-7.2C355.6,255.1,355.2,253.3,354.7,251.6z
M85.9,158.7c0,1.5-0.3,2.9-1.4,4.1c-0.9,1.1-2.3,1.7-3.7,1.9c-1.5,0.1-3-0.4-4.1-1.4c-1-0.9-1.9-2.3-1.9-3.7V158
c0-1.5,0.3-2.9,1.4-4.1c0.9-1.1,2.3-1.7,3.7-1.9c1.5-0.1,3,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7V158.7z M107,147.8
c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4c-1.1-0.9-1.7-2.3-1.9-3.7c-0.1-1.5,0.4-3,1.4-4.1c0.9-1,2.3-1.9,3.7-1.9
h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7C108.5,145.2,108,146.6,107,147.8z M121.3,107.6c-7.1,0-7.9-11-0.8-11
C127.5,96.6,128.4,107.6,121.3,107.6z M142.9,125.7c0,1.5-0.3,2.9-1.4,4.1c-0.9,1.1-2.3,1.7-3.7,1.9c-1.5,0.1-2.9-0.4-4.1-1.4
c-1-0.9-1.9-2.3-1.9-3.7V125c0-1.5,0.3-2.9,1.4-4.1c0.9-1.1,2.3-1.7,3.7-1.9c1.5-0.1,2.9,0.4,4.1,1.4c1,0.9,1.9,2.3,1.9,3.7
V125.7z M161,101.3c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4c-1.1-0.9-1.7-2.3-1.9-3.7c-0.1-1.5,0.4-2.9,1.4-4.1
c0.9-1,2.3-1.9,3.7-1.9h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7C162.5,98.7,162,100.2,161,101.3z M183.5,66.6
c7.1,0,7.9,11,0.8,11C177.3,77.6,176.4,66.6,183.5,66.6z M191.8,97.1c-7.1,0-7.9-11-0.8-11C198,86.1,198.9,97.1,191.8,97.1z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M374.5,391.6c-1.2-7.2-2.5-14.5-3.4-21.7c-0.9-7.3-1-14.7-1.4-22c-1.7-26.9-4.9-53.7-10.8-80
c-16.5,9.5-33.8,17.7-51.5,24.9c4.5,12.5,7.7,25.4,9.7,38.7c3.7,25.6,2.8,52.3-0.8,77.9c-2.9,20.5-9.4,39.5-20.1,56.8
c22.5-4.2,44.4-11.7,64.6-22.4c4.3-2.3,8.6-4.7,12.8-7.3c0-0.7,0.2-1.5,0.5-2.3C379.6,421.2,376.7,405.1,374.5,391.6z
M332.8,440.6c-7.1,0-7.9-11-0.8-11C339,429.6,339.9,440.6,332.8,440.6z M350,422.2c-1.9,2.1-5.6,2.6-7.8,0.5l-1.5-1.5
c-1-1-1.7-2.2-1.9-3.7c-0.1-1.5,0.4-3,1.4-4.1c1.9-2.1,5.6-2.6,7.8-0.5c0.5,0.5,1,1,1.5,1.5c1,1,1.7,2.2,1.9,3.7
C351.5,419.7,351,421.1,350,422.2z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M386.4,202.5c-7.6-22.5-14.5-45.9-17.7-69.5c-2.7-19.8-3.5-42.5,6.6-60.6C333.2,45.6,282.8,32,233,38.5
c-16.1,2.1-31.9,6.4-47.1,12.6c50.7-0.2,96.9,44.3,125.5,83.7c25.4,35,43.3,74.6,54.4,116.2c10.6-6.7,20.8-14,30.3-22.1
C392.7,220.1,389.4,211.4,386.4,202.5z M272,63.8c-0.9,1-2.3,1.9-3.7,1.9h-3c-1.5,0-2.9-0.3-4.1-1.4c-1.1-0.9-1.7-2.3-1.9-3.7
c-0.1-1.5,0.4-2.9,1.4-4.1c0.9-1,2.3-1.9,3.7-1.9h3c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7C273.5,61.2,273,62.7,272,63.8
z M312.5,66.8c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4c-1.1-0.9-1.7-2.3-1.9-3.7c-0.1-1.5,0.4-3,1.4-4.1
c0.9-1,2.3-1.9,3.7-1.9h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7C314,64.2,313.5,65.7,312.5,66.8z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M450.9,149.9c-16.6-28-39.6-52.3-66.4-71.2c-9,17.4-7.3,39.1-4.2,57.9c3.8,23,10.5,45.7,18.3,67.6
c2,5.7,4.1,11.3,6.2,17c2-1.8,4-3.7,5.9-5.6c16.3-16.3,34.2-34,39.6-57C447.8,156.1,447.5,151.6,450.9,149.9z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M465.8,322.7c-1-1.5-8.2-3.2-10.7-4.1c-4.8-1.8-9-4.2-13-7.3c-9.1-6.9-15.4-15.7-20.4-25.8
c-7.6-15.1-14.7-30.5-21.3-46.1c-3.1,2.5-6.2,5-9.3,7.3c-7.3,5.5-14.8,10.5-22.5,15.3c1.8,7.6,3.4,15.2,4.8,22.9
c2.5,13.8,4.3,27.7,5.6,41.7c1.3,13.7,1.2,27.6,2.9,41.2c2.4,18.9,8.8,40.1,5.4,59.5c32.7-23.5,59.2-55.4,75.3-92.5
c1.5-3.6,3-7.2,4.3-10.8C466.5,323.6,466.1,323.2,465.8,322.7z M411.5,390.7c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4
c-1.1-0.9-1.7-2.3-1.9-3.7c-0.1-1.5,0.4-2.9,1.4-4.1c0.9-1,2.3-1.9,3.7-1.9h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7
C413,388.2,412.5,389.6,411.5,390.7z"/>
</g>
</g>
<g>
<g>
<path fill="#F6851F" d="M468.4,187c-2.5-7.1-5.4-14.1-8.7-20.9c-4.5,14.6-13.6,27.6-23.8,39.1c-8.4,9.4-17.3,18.4-26.8,26.8
c7,17.5,14.8,34.8,23.7,51.3c5,9.2,11.8,17.9,21.2,22.9c4.8,2.5,11.6,3.6,16.6,6.6C483.1,271.8,482.7,227.6,468.4,187z"/>
</g>
</g>
<g>
<g>
<path d="M436.3,110.4c-32.2-37-75.5-63.8-122.8-76.8c-48.1-13.2-98.5-9-143.5,12.5C97.3,81,35.8,156.3,40.3,240.1
c-8.8,48.4,0.4,97.5,25,140.1c23.8,41,62.3,73.7,107.3,88.9c34.6,11.7,71.2,15,106.9,10.6c2.1,1.9,5.2,2.3,7.4-0.5
c0.1-0.2,0.3-0.4,0.4-0.6c58.7-9,114-38.8,152.2-85.5c32.6-40,51.2-89.9,51.1-141.6C490.5,200,470.1,149.1,436.3,110.4z
M384.5,78.6c26.8,18.9,49.8,43.3,66.4,71.2c-3.4,1.7-3.1,6.2-0.6,8.6c-5.4,23.1-23.2,40.7-39.6,57c-1.9,1.9-3.9,3.8-5.9,5.6
c-2.2-5.7-4.2-11.3-6.2-17c-7.8-21.9-14.5-44.6-18.3-67.6C377.2,117.8,375.4,96,384.5,78.6z M233,38.5
c49.8-6.4,100.1,7.2,142.3,34c-10.1,18-9.3,40.7-6.6,60.6c3.3,23.6,10.1,46.9,17.7,69.5c3,8.9,6.2,17.6,9.7,26.3
c-9.6,8-19.8,15.4-30.3,22.1c-11.1-41.6-29-81.2-54.4-116.2C282.8,95.3,236.6,50.8,185.9,51C201.1,44.9,216.9,40.5,233,38.5z
M104.8,107.4c13.1-14,28.1-26.7,44.5-37.3c1,0.3,2.2,0.2,3.4-0.4c47.9-22.4,94.6,9.1,126.8,43.4c36.4,38.6,61.1,87.5,75.1,138.4
c0.5,1.7,0.9,3.5,1.4,5.2c-4.2,2.5-8.5,4.9-12.8,7.2c-13,7-26.4,13.1-40,18.6c-12.9-30.6-33.4-57.8-60.2-78.1
c-27.5-20.8-59.7-37.1-94.5-40.1c-33.1-2.8-64.7,8-91.9,26.2C65.2,159.6,82.6,131.1,104.8,107.4z M48.3,286.1c-0.1-1-0.1-2-0.1-3
h2.6c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1c-0.1-1.4-0.8-2.8-1.9-3.7c-1.2-1-2.5-1.4-4.1-1.4h-1.9
c0.1-4.6,0.4-9.2,0.8-13.8c0.2,0.3,0.5,0.7,0.8,1c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1
c-0.1-1.4-0.8-2.8-1.9-3.7c-1.2-1-2.5-1.4-4.1-1.4H53c-1.1,0-2.3,0.6-3.2,1.4c0.3-2.3,0.6-4.6,1-6.8c0.4-0.8,0.7-1.8,0.6-3
c0-0.2,0-0.3,0-0.5c0.1-0.7,0-1.3-0.1-1.9c-0.6-11.4,0.2-22.6,2.2-33.6c1,0,2-0.3,3.1-1.1c23.7-17.3,50.7-28.8,80.4-29.3
c28-0.5,54.9,10,78.6,24.1c23.3,13.9,43.7,31.9,59.3,54.1c7.3,10.4,13.4,21.6,18.3,33.4c-8.6,3.2-17.2,6.3-25.9,9.1
c-22.6,7.5-45.5,14.2-68.7,19.4c-26.4,5.9-54.2,9.7-81.3,7.3c-26-2.3-52-11.6-66.8-34.3C49.8,287.1,49.1,286.5,48.3,286.1z
M281.4,468.5c-20.8,2.6-42,2.5-62.8-0.2c-24.5-3.2-48.2-9.9-70-21.6c-1.9-1-3.8-2.1-5.6-3.2c1.2-0.2,2.3-0.9,3.1-1.8
c1-1.1,1.5-2.6,1.4-4.1c-0.1-1.4-0.8-2.8-1.9-3.7c-1.2-1-2.5-1.4-4.1-1.4H140c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4
c-8.2-5.4-15.9-11.5-23.1-18.1c0.8-1.1,1.1-2.4,1.1-3.7v-1.5c0-1.4-0.9-2.8-1.9-3.7c-1.1-1-2.6-1.5-4.1-1.4
c-1.4,0.1-2.8,0.8-3.7,1.9c0,0,0,0.1-0.1,0.1c-3.2-3.3-6.2-6.7-9.2-10.2c-23.3-27.8-38.3-61.3-43.7-96.4
c24.8,25.8,64.4,30.2,99.2,28c45.1-2.9,89.9-16.4,132.4-31.1c5.1-1.8,10.2-3.6,15.2-5.5c2.9,8.2,5.2,16.6,7,25.1
c5.3,25.6,4.7,51.7,2.2,77.6C303.8,424.7,296.2,448.1,281.4,468.5z M374,434.2c-0.3,0.8-0.5,1.6-0.5,2.3c-4.2,2.6-8.4,5-12.8,7.3
c-20.3,10.8-42.1,18.2-64.6,22.4c10.6-17.3,17.2-36.3,20.1-56.8c3.6-25.6,4.5-52.3,0.8-77.9c-1.9-13.2-5.2-26.2-9.7-38.7
c17.7-7.2,35-15.4,51.5-24.9c6,26.3,9.2,53.1,10.8,80c0.5,7.3,0.5,14.7,1.4,22c0.9,7.3,2.3,14.5,3.4,21.7
C376.7,405.1,379.6,421.2,374,434.2z M462.6,334.7c-16.1,37.1-42.6,69-75.3,92.5c3.4-19.4-3.1-40.6-5.4-59.5
c-1.7-13.6-1.6-27.5-2.9-41.2c-1.3-14-3.2-27.9-5.6-41.7c-1.4-7.7-3-15.3-4.8-22.9c7.7-4.8,15.2-9.9,22.5-15.3
c3.2-2.4,6.3-4.8,9.3-7.3c6.5,15.6,13.7,31,21.3,46.1c5.1,10.1,11.3,19,20.4,25.8c4.1,3.1,8.3,5.5,13,7.3
c2.5,0.9,9.7,2.7,10.7,4.1c0.3,0.5,0.7,0.9,1.1,1.2C465.6,327.5,464.1,331.1,462.6,334.7z M454,306.1c-9.4-5-16.2-13.7-21.2-22.9
c-8.9-16.5-16.7-33.7-23.7-51.3c9.4-8.4,18.4-17.4,26.8-26.8c10.2-11.4,19.2-24.4,23.8-39.1c3.3,6.8,6.2,13.8,8.7,20.9
c14.3,40.6,14.7,84.8,2.3,125.7C465.7,309.7,458.8,308.6,454,306.1z"/>
</g>
</g>
<g>
<g>
<path d="M147.5,405.6c-7.1,0-6.2,11,0.8,11C155.4,416.6,154.5,405.6,147.5,405.6z"/>
</g>
</g>
<g>
<g>
<path d="M118.5,377c-1.2-1-2.5-1.4-4.1-1.4H113c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C120.3,379.3,119.6,377.9,118.5,377z"/>
</g>
</g>
<g>
<g>
<path d="M148.5,380c-1.2-1-2.5-1.4-4.1-1.4H143c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C150.3,382.3,149.6,380.9,148.5,380z"/>
</g>
</g>
<g>
<g>
<path d="M95,351.6c-7.1,0-6.2,11,0.8,11C102.9,362.6,102,351.6,95,351.6z"/>
</g>
</g>
<g>
<g>
<path d="M90,272c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-1,1.2-1.4,2.5-1.4,4.1v1.5c0,1.4,0.9,2.8,1.9,3.7
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1v-1.5C91.9,274.3,91,272.9,90,272z"/>
</g>
</g>
<g>
<g>
<path d="M72,239c-2.3-2-5.7-1.7-7.8,0.5c-2.3,2.4-2.8,5.3-2.9,8.6c0,3,3.1,5.3,5.9,5.1c3.2-0.2,5.1-2.9,5.1-5.9
c0-0.1,0-0.1,0-0.2c0,0,0,0,0-0.1c0-0.1,0.1-0.1,0.1-0.2C74.6,244.6,74.2,240.9,72,239z"/>
</g>
</g>
<g>
<g>
<path d="M93,213.5c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-1,1.2-1.4,2.5-1.4,4.1v1.5c0,1.4,0.9,2.8,1.9,3.7
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1v-1.5C94.9,215.8,94,214.4,93,213.5z"/>
</g>
</g>
<g>
<g>
<path d="M77,195.6c-7.1,0-6.2,11,0.8,11C84.9,206.6,84,195.6,77,195.6z"/>
</g>
</g>
<g>
<g>
<path d="M106.5,140c-1.2-1-2.5-1.4-4.1-1.4H101c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C108.3,142.3,107.6,140.9,106.5,140z"/>
</g>
</g>
<g>
<g>
<path d="M141,120.5c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-1,1.2-1.4,2.5-1.4,4.1v1.5c0,1.4,0.9,2.8,1.9,3.7
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1v-1.5C142.9,122.8,142,121.4,141,120.5z"/>
</g>
</g>
<g>
<g>
<path d="M160.5,93.5c-1.2-1-2.5-1.4-4.1-1.4H155c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C162.3,95.8,161.6,94.4,160.5,93.5z"/>
</g>
</g>
<g>
<g>
<path d="M191,86.1c-7.1,0-6.2,11,0.8,11C198.9,97.1,198,86.1,191,86.1z"/>
</g>
</g>
<g>
<g>
<path d="M216,431c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-1,1.2-1.4,2.5-1.4,4.1v1.5c0,1.4,0.9,2.8,1.9,3.7
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1v-1.5C217.9,433.3,217,431.9,216,431z"/>
</g>
</g>
<g>
<g>
<path d="M236,401.1c-7.1,0-6.2,11,0.8,11C243.9,412.1,243,401.1,236,401.1z"/>
</g>
</g>
<g>
<g>
<path d="M255,440c-1.2-1-2.5-1.4-4.1-1.4h-1.5c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C256.8,442.3,256.1,440.9,255,440z"/>
</g>
</g>
<g>
<g>
<path d="M182,404.1c-7.1,0-6.2,11,0.8,11C189.9,415.1,189,404.1,182,404.1z"/>
</g>
</g>
<g>
<g>
<path d="M332,429.6c-7.1,0-6.2,11,0.8,11C339.9,440.6,339,429.6,332,429.6z"/>
</g>
</g>
<g>
<g>
<path d="M411,383c-1.2-1-2.5-1.4-4.1-1.4h-1.5c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C412.8,385.3,412.1,383.9,411,383z"/>
</g>
</g>
<g>
<g>
<path d="M349.5,414.5c-0.5-0.5-1-1-1.5-1.5c-2.1-2.1-5.9-1.6-7.8,0.5c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.5,0.8,2.7,1.9,3.7l1.5,1.5
c2.1,2.1,5.9,1.6,7.8-0.5c1-1.1,1.5-2.6,1.4-4.1C351.2,416.7,350.5,415.5,349.5,414.5z"/>
</g>
</g>
<g>
<g>
<path d="M271.5,56c-1.2-1-2.5-1.4-4.1-1.4h-3c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h3c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C273.3,58.3,272.6,56.9,271.5,56z"/>
</g>
</g>
<g>
<g>
<path d="M312,59c-1.2-1-2.5-1.4-4.1-1.4h-1.5c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C313.8,61.3,313.1,59.9,312,59z"/>
</g>
</g>
<g>
<g>
<path d="M183.5,66.6c-7.1,0-6.2,11,0.8,11C191.4,77.6,190.5,66.6,183.5,66.6z"/>
</g>
</g>
<g>
<g>
<path d="M120.5,96.6c-7.1,0-6.2,11,0.8,11C128.4,107.6,127.5,96.6,120.5,96.6z"/>
</g>
</g>
<g>
<g>
<path d="M84,153.5c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-1,1.2-1.4,2.5-1.4,4.1v1.5c0,1.4,0.9,2.8,1.9,3.7
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1v-1.5C85.9,155.8,85,154.4,84,153.5z"/>
</g>
</g>
<g>
<g>
<path d="M57.5,212.1c-7.1,0-6.2,11,0.8,11C65.4,223.1,64.5,212.1,57.5,212.1z"/>
</g>
</g>
<g>
<g>
<path d="M73.5,278c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-1,1.2-1.4,2.5-1.4,4.1v1.5c0,1.4,0.9,2.8,1.9,3.7
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1v-1.5C75.4,280.3,74.5,278.9,73.5,278z"/>
</g>
</g>
<g>
<g>
<path d="M72,326c-1.2-1-2.5-1.4-4.1-1.4h-1.5c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C73.8,328.3,73.1,326.9,72,326z"/>
</g>
</g>
<g>
<g>
<path d="M87.3,367.7c-0.1-0.5-0.1-1.1-0.4-1.6c-0.5-1.3-0.7-1.4-1.6-2.4c-0.6-0.7-2-1.3-3-1.4c-0.8-0.1-1.6-0.1-2.4-0.1
c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7c0.2,0.2,0.4,0.3,0.6,0.4c0.3,0.4,0.6,0.8,0.9,1.1
c1.1,1,2.6,1.5,4.1,1.4c1.4-0.1,2.8-0.8,3.7-1.9c1-1.2,1.4-2.5,1.4-4.1C87.4,368.4,87.4,368.1,87.3,367.7z"/>
</g>
</g>
<g>
<g>
<path d="M177,438.5c-1.2-1-2.5-1.4-4.1-1.4h-1.5c-1.4,0-2.8,0.9-3.7,1.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7
c1.2,1,2.5,1.4,4.1,1.4h1.5c1.4,0,2.8-0.9,3.7-1.9c1-1.1,1.5-2.6,1.4-4.1C178.8,440.8,178.1,439.4,177,438.5z"/>
</g>
</g>
<g>
<g>
<path d="M210.5,453.6c-7.1,0-6.2,11,0.8,11C218.4,464.6,217.5,453.6,210.5,453.6z"/>
</g>
</g>
<g>
<g>
<path d="M237.4,461.7c0-1.4-0.9-2.8-1.9-3.7c-1.1-1-2.6-1.5-4.1-1.4c-1.4,0.1-2.8,0.8-3.7,1.9c-0.2,0.2-0.3,0.4-0.4,0.6
c-0.4,0.3-0.8,0.6-1.1,0.9c-1,1.1-1.5,2.6-1.4,4.1c0.1,1.4,0.8,2.8,1.9,3.7c1.2,1,2.5,1.4,4.1,1.4c0.3,0,0.6,0,0.9,0
c0.5-0.1,1.1-0.1,1.6-0.4c1.3-0.5,1.4-0.7,2.4-1.6c0.7-0.6,1.3-2,1.4-3C237.4,463.3,237.4,462.5,237.4,461.7z"/>
</g>
</g>
<g>
<g>
<path d="M251,452.1c-7.1,0-6.2,11,0.8,11C258.9,463.1,258,452.1,251,452.1z"/>
</g>
</g>
</g>
</svg>';
$canvas = new Imagick();
$canvas->newImage(256, 256, "rgba(0,0,0,0)");
$canvas->setBackgroundColor(new ImagickPixel('transparent'));
$canvas->setResolution(2000, 2000);
$canvas->readImageBlob($svg);
$canvas->borderImage('rgba(0,0,0,0)', 20, 20);
$canvas->setImageFormat("png");
$canvas->thumbnailImage(256, 256, true, true);
if($file=fopen("tess.png", "w")){
$canvas->writeImageFile($file);
}
?>