Unable to generate PNG from SVG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
som
Posts: 6
Joined: 2019-07-21T07:41:30-07:00
Authentication code: 1152

Unable to generate PNG from SVG

Post by som »

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.

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.9,1.7,2.3,1.9,3.7
				C74,331.2,73.5,332.6,72.5,333.7z M86,372.7c-0.9,1.1-2.3,1.7-3.7,1.9c-1.5,0.1-3-0.4-4.1-1.4c-0.3-0.3-0.7-0.7-0.9-1.1
				c-0.2-0.1-0.4-0.3-0.6-0.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.9c0.8,0,1.6,0,2.4,0.1
				c0.9,0.2,2.3,0.7,3,1.4c0.9,1.1,1.1,1.1,1.6,2.4c0.2,0.5,0.3,1.1,0.4,1.6c0,0.3,0,0.6,0,0.9C87.4,370.2,87.1,371.6,86,372.7z
				 M95.8,362.6c-7.1,0-7.9-11-0.8-11C102,351.6,102.9,362.6,95.8,362.6z M119,384.7c-0.9,1-2.3,1.9-3.7,1.9h-1.5
				c-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.9h1.5c1.5,0,2.9,0.3,4.1,1.4
				c1.1,0.9,1.7,2.3,1.9,3.7C120.5,382.2,120,383.6,119,384.7z M139.8,388.2c-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.7c0.1,1.5-0.4,3-1.4,4.1c-0.9,1-2.3,1.9-3.7,1.9h-1.5
				C142.3,389.6,140.9,389.3,139.8,388.2z M148.3,416.6c-7.1,0-7.9-11-0.8-11C154.5,405.6,155.4,416.6,148.3,416.6z M177.5,446.2
				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.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.2-36-40.2-59.3-54.1c-23.7-14.1-50.6-24.6-78.6-24.1
				c-29.7,0.5-56.7,11.9-80.4,29.3c-1,0.8-2.1,1.1-3.1,1.1c-1.9,11-2.7,22.2-2.2,33.6c0.1,0.6,0.2,1.2,0.1,1.9c0,0.2,0,0.3,0,0.5
				c0.1,1.2-0.2,2.2-0.6,3c-0.4,2.3-0.7,4.6-1,6.8c0.9-0.8,2.1-1.4,3.2-1.4h1.5c1.5,0,2.9,0.3,4.1,1.4c1.1,0.9,1.7,2.3,1.9,3.7
				c0.1,1.5-0.4,2.9-1.4,4.1c-0.9,1-2.3,1.9-3.7,1.9h-1.5c-1.5,0-2.9-0.3-4.1-1.4c-0.3-0.3-0.6-0.6-0.8-1c-0.4,4.6-0.7,9.2-0.8,13.8
				H50c1.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.9,1-2.3,1.9-3.7,1.9h-2.6c0,1,0.1,2,0.1,3
				c0.8,0.4,1.5,1,2.1,2c14.8,22.8,40.8,32,66.8,34.3c27.1,2.4,54.8-1.5,81.3-7.3c23.2-5.1,46.1-11.9,68.7-19.4
				c8.7-2.9,17.3-5.9,25.9-9.1C288.2,274.8,282.1,263.6,274.8,253.1z M58.3,223.1c-7.1,0-7.9-11-0.8-11
				C64.5,212.1,65.4,223.1,58.3,223.1z M61.4,248c0-3.2,0.6-6.1,2.9-8.6c2.1-2.2,5.5-2.5,7.8-0.5c2.2,1.9,2.6,5.6,0.5,7.8
				c0,0.1-0.1,0.1-0.1,0.2c0,0,0,0.1,0,0.1c0,0.1,0,0.1,0,0.2c0,3-1.9,5.7-5.1,5.9C64.5,253.3,61.4,251,61.4,248z M75.4,283.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.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);
} 




?>
Thanks in Advance
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Unable to generate PNG from SVG

Post by fmw42 »

What IM version? What platform? What SVG renderer and its version: Imagemagick MSVG/XML, RSVG delegate, Inkscape?

Using command line Imagemagick 6.9.10.55 Q16 Mac OSX and Inkscape installed, your svg file renders fine as a basketball

Code: Select all

convert test.svg test.png
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Unable to generate PNG from SVG

Post by snibgo »

Why do you have "newImage"? What is the point of that?
snibgo's IM pages: im.snibgo.com
theanh
Posts: 2
Joined: 2019-07-21T21:14:06-07:00
Authentication code: 1152

Re: Unable to generate PNG from SVG

Post by theanh »

Cách làm vòng tay thêm điểm cho mình

Một loạt các đồ trang sức là một phụ kiện thiết yếu cho các cô gái, và Vòng đeo tay đá phong thủy đá phong thủy là một đồ trang sức phản ánh sự thanh lịch của phụ nữ. Các cô gái sẽ đeo một số vòng tay để thể hiện vẻ đẹp độc đáo của họ. Trong nhiều Vòng đeo tay đá phong thủy, chúng ta nên chọn Vòng đeo tay đá phong thủy phù hợp với chúng ta như thế nào? Hãy xem trang sức

Một loạt các đồ trang sức là một phụ kiện thiết yếu cho các cô gái, và Vòng đeo tay đá phong thủy là một đồ trang sức phản ánh sự thanh lịch của phụ nữ. Các cô gái sẽ đeo một số vòng tay để thể hiện vẻ đẹp độc đáo của họ. Trong nhiều Vòng đeo tay đá phong thủy, chúng ta nên chọn Vòng đeo tay đá phong thủy phù hợp với chúng ta như thế nào? Hãy xem trang sức

Image

  Cách làm vòng tay thêm điểm cho mình


  Vòng đeo tay đá phong thủy chất lượng là một khía cạnh quan trọng khi lựa chọn Vòng đeo tay đá phong thủy. Trước hết, nó phụ thuộc vào hình dạng tổng thể có hoàn chỉnh hay không, và sau đó liệu cấu trúc quy trình có hợp lý và chắc chắn hay không. Ví dụ, Vòng đeo tay đá phong thủy chủ yếu được tạo thành từ nhiều vòng nhỏ. Nếu kết nối giữa vòng và vòng không tốt, nó sẽ dễ dàng rơi ra. để xem liệu sản xuất tốt, chẳng hạn như chuỗi chính nó là mịn, hoa văn tinh tế cho dù có khúc xạ của một viên kim cương, màu ngọc trai, hình dạng, kích thước, vv, được để được xem xét một cách cẩn thận.


  Vòng tay làm bằng các vật liệu khác nhau có màu sắc vốn có của riêng họ. Vẻ đẹp và vẻ đẹp của bất kỳ màu sắc nào được kết hợp và kết hợp để phản ánh đầy đủ sự quyến rũ của nó. Do đó, khi chọn Vòng đeo tay đá phong thủy, người ta phải nhìn vào chất lượng màu sắc của trang sức, thứ hai là xem màu của trang sức có phù hợp với màu da của chính nó hay không, thứ ba là xem màu của Vòng đeo tay đá phong thủy và màu của quần áo có phù hợp hay không.


  Cũng chọn một Vòng đeo tay đá phong thủy phù hợp với kích thước của bạn. Nếu nó quá lớn, nó sẽ quá lỏng và sẽ rơi xuống tay. Nó sẽ quá chặt và sẽ ảnh hưởng đến vẻ ngoài. Một người có cổ tay mỏng không nên đeo một chiếc vòng tay lớn, điều này sẽ làm cho cổ tay trông mỏng hơn. Những người có cổ tay dày hơn, chẳng hạn như vòng tay quá mỏng, cũng sẽ xuất hiện dày hơn trong tương phản. Những người có cánh tay ngắn nên đeo vòng tay nhỏ hơn, hẹp và lớn hơn. Nếu Vòng đeo tay đá phong thủy thanh lịch hơn.


  Một chiếc vòng tay là một vật trang trí trên bàn tay tô điểm cho các đường chỉ tay của bạn và làm cho bàn tay của bạn đẹp hơn.


Mọi thông tin liên hệ mua bán vòng tay , trang sức đá phong thủy xin vui lòng liên hệ :

Website: Cửa Hàng Trang Sức Phong Thủy Quà Tặng Cải Vận

Hotline/Zalo : 0982124296

ĐỊa chỉ: 24 / 109 Quan Nhân - Thanh Xuân - Hà Nội
Last edited by theanh on 2019-09-08T08:53:01-07:00, edited 1 time in total.
som
Posts: 6
Joined: 2019-07-21T07:41:30-07:00
Authentication code: 1152

Re: Unable to generate PNG from SVG

Post by som »

fmw42 wrote: 2019-07-21T10:20:23-07:00 What IM version? What platform? What SVG renderer and its version: Imagemagick MSVG/XML, RSVG delegate, Inkscape?

Using command line Imagemagick 6.9.10.55 Q16 Mac OSX and Inkscape installed, your svg file renders fine as a basketball

Code: Select all

convert test.svg test.png
Windows - Apache Server. Below is my imagick verison.
Version: ImageMagick 7.0.8-55 Q16 x86 2019-07-19
som
Posts: 6
Joined: 2019-07-21T07:41:30-07:00
Authentication code: 1152

Re: Unable to generate PNG from SVG

Post by som »

snibgo wrote: 2019-07-21T10:28:10-07:00 Why do you have "newImage"? What is the point of that?
That line can be ignored.
Below is the error i am getting

<img src="<br />
<b>Fatal error</b>: Uncaught ImagickException: MemoryAllocationFailed `**LOCALDRIVEPATH/Local/Temp/magick-12960PEVgxqnEOgtf' @ error/svg.c/ReadSVGImage/3012 in **LOCALDRIVEPATH/testsvg.php:11
Stack trace:
#0 **LOCALDRIVEPATH\testsvg.php(11): Imagick-&gt;readimageblob('&lt;?xml version=&quot;...')
#1 **LOCALDRIVEPATH\testsvg.php(358): createPNG('&lt;?xml version=&quot;...', 256)
#2 {main}
thrown in <b>**LOCALDRIVEPATH\testsvg.php</b> on line <b>11</b><br />
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Unable to generate PNG from SVG

Post by fmw42 »

What SVG renderer are you using? See my post above? What does

Code: Select all

magick -list format
say for SVG?

Try using my command line command but replace magick for convert. Perhaps your problem is in your Imagick code and not Imagemagick.
som
Posts: 6
Joined: 2019-07-21T07:41:30-07:00
Authentication code: 1152

Re: Unable to generate PNG from SVG

Post by som »

theanh wrote: 2019-07-21T21:17:20-07:00 https://www.npmjs.com/package/convert-svg-to-png this
I would be so happy if i can use node in my server. Its a PHP code.
som
Posts: 6
Joined: 2019-07-21T07:41:30-07:00
Authentication code: 1152

Re: Unable to generate PNG from SVG

Post by som »

fmw42 wrote: 2019-07-21T22:04:34-07:00 What SVG renderer are you using? See my post above? What does

Code: Select all

magick -list format
say for SVG?

Try using my command line command but replace magick for convert. Perhaps your problem is in your Imagick code and not Imagemagick.
i was able to generate PNG for other SVG's but for few SVG i wasnt able to do it. The one listed in the post is one of them.

Below are the details i got executing magick -list format

Format Module Mode Description
-------------------------------------------------------------------------------
3FR DNG r-- Hasselblad CFV/H3D39II
3G2 MPEG r-- Media Container
3GP MPEG r-- Media Container
AAI* AAI rw+ AAI Dune image
AI PDF rw- Adobe Illustrator CS2
ART* ART rw- PFS: 1st Publisher Clip Art
ARW DNG r-- Sony Alpha Raw Image Format
AVI MPEG r-- Microsoft Audio/Visual Interleaved
AVS* AVS rw+ AVS X image
BGR* BGR rw+ Raw blue, green, and red samples
BGRA* BGR rw+ Raw blue, green, red, and alpha samples
BGRO* BGR rw+ Raw blue, green, red, and opacity samples
BIE* JBIG --- Joint Bi-level Image experts Group interchange format
BMP* BMP rw- Microsoft Windows bitmap image
BMP2* BMP rw- Microsoft Windows bitmap image (V2)
BMP3* BMP rw- Microsoft Windows bitmap image (V3)
BRF* BRAILLE -w- BRF ASCII Braille format
CAL* CALS rw- Continuous Acquisition and Life-cycle Support Type 1
Specified in MIL-R-28002 and MIL-PRF-28002
CALS* CALS rw- Continuous Acquisition and Life-cycle Support Type 1
Specified in MIL-R-28002 and MIL-PRF-28002
CANVAS* XC r-- Constant image uniform color
CAPTION* CAPTION r-- Caption
CIN* CIN rw- Cineon Image File
CIP* CIP -w- Cisco IP phone image format
CLIP* CLIP rw+ Image Clip Mask
CLIPBOARD* CLIPBOARD rw- The system clipboard
CMYK* CMYK rw+ Raw cyan, magenta, yellow, and black samples
CMYKA* CMYK rw+ Raw cyan, magenta, yellow, black, and alpha samples
CR2 DNG r-- Canon Digital Camera Raw Image Format
CRW DNG r-- Canon Digital Camera Raw Image Format
CUBE* CUBE r-- Cube LUT
CUR* ICON rw- Microsoft icon
CUT* CUT r-- DR Halo
DATA* INLINE rw+ Base64-encoded inline images
DCM* DCM r-- Digital Imaging and Communications in Medicine image
DICOM is used by the medical community for images like X-rays. The
specification, "Digital Imaging and Communications in Medicine
(DICOM)", is available at http://medical.nema.org/. In particular,
see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
and supplement 61 which adds JPEG-2000 encoding.
DCR DNG r-- Kodak Digital Camera Raw Image File
DCRAW DNG r-- Raw Photo Decoder (dcraw)
DCX* PCX rw+ ZSoft IBM PC multi-page Paintbrush
DDS* DDS rw+ Microsoft DirectDraw Surface
DFONT* TTF r-- Multi-face font package (Freetype 2.10.0)
DJVU* DJVU --- Deja vu
See http://www.djvuzone.org/ for details about the DJVU format. The
DJVU 1.2 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/djvu/documents/.
DNG DNG r-- Digital Negative
DOT DOT --- Graphviz
DPS DPS --- Display Postscript Interpreter
DPX* DPX rw- SMPTE 268M-2003 (DPX 2.0)
Digital Moving Picture Exchange Bitmap, Version 2.0.
See SMPTE 268M-2003 specification at http://www.smtpe.org

DXT1* DDS rw+ Microsoft DirectDraw Surface
DXT5* DDS rw+ Microsoft DirectDraw Surface
EMF EMF r-- Windows Enhanced Meta File
EPDF PDF rw- Encapsulated Portable Document Format
EPI PS rw- Encapsulated PostScript Interchange format
EPS PS rw- Encapsulated PostScript
EPS2 PS2 -w- Level II Encapsulated PostScript
EPS3 PS3 -w+ Level III Encapsulated PostScript
EPSF PS rw- Encapsulated PostScript
EPSI PS rw- Encapsulated PostScript Interchange format
EPT EPT rw- Encapsulated PostScript with TIFF preview
EPT2 EPT rw- Encapsulated PostScript Level II with TIFF preview
EPT3 EPT rw+ Encapsulated PostScript Level III with TIFF preview
ERF DNG r-- Epson RAW Format
EXR EXR rw- High Dynamic-range (HDR)
FAX* FAX rw+ Group 3 FAX
FAX machines use non-square pixels which are 1.5 times wider than
they are tall but computer displays use square pixels, therefore
FAX images may appear to be narrow unless they are explicitly
resized using a geometry of "150x100%".

FILE* URL r-- Uniform Resource Locator (file://)
FITS* FITS rw- Flexible Image Transport System
FLIF* FLIF rw+ Free Lossless Image Format (libflif 0.0.2 [0000])
FLV MPEG rw+ Flash Video Stream
FPX FPX --- FlashPix Format
FRACTAL* PLASMA r-- Plasma fractal image
FTP* URL r-- Uniform Resource Locator (ftp://)
FTS* FITS rw- Flexible Image Transport System
G3* FAX rw- Group 3 FAX
G4* FAX rw- Group 4 FAX
GIF* GIF rw+ CompuServe graphics interchange format
GIF87* GIF rw- CompuServe graphics interchange format (version 87a)
GRADIENT* GRADIENT r-- Gradual linear passing from one shade to another
GRAY* GRAY rw+ Raw gray samples
GRAYA* GRAY rw+ Raw gray and alpha samples
GROUP4* TIFF rw- Raw CCITT Group4
GV DOT --- Graphviz
HALD* HALD r-- Identity Hald color lookup table image
HDR* HDR rw+ Radiance RGBE image format
HEIC* HEIC r-- High Efficiency Image Format (1.4.0)
HISTOGRAM* HISTOGRAM -w- Histogram of the image
HRZ* HRZ rw- Slow Scan TeleVision
HTM* HTML -w- Hypertext Markup Language and a client-side image map
HTML* HTML -w- Hypertext Markup Language and a client-side image map
HTTP* URL r-- Uniform Resource Locator (http://)
HTTPS* URL r-- Uniform Resource Locator (https://)
ICB* TGA rw- Truevision Targa image
ICO* ICON rw+ Microsoft icon
ICON* ICON rw- Microsoft icon
IIQ DNG r-- Phase One Raw Image Format
INFO INFO -w+ The image format and characteristics
INLINE* INLINE rw+ Base64-encoded inline images
IPL* IPL rw+ IPL Image Sequence
ISOBRL* BRAILLE -w- ISO/TR 11548-1 format
ISOBRL6* BRAILLE -w- ISO/TR 11548-1 format 6dot
J2C* JP2 rw- JPEG-2000 Code Stream Syntax (2.3.1)
J2K* JP2 rw- JPEG-2000 Code Stream Syntax (2.3.1)
JBG* JBIG --- Joint Bi-level Image experts Group interchange format
JBIG* JBIG --- Joint Bi-level Image experts Group interchange format
JNG* PNG rw- JPEG Network Graphics
See http://www.libpng.org/pub/mng/ for details about the JNG
format.
JNX* JNX r-- Garmin tile format
JP2* JP2 rw- JPEG-2000 File Format Syntax (2.3.1)
JPC* JP2 rw- JPEG-2000 Code Stream Syntax (2.3.1)
JPE* JPEG rw- Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.0.2)
JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.0.2)
JPG* JPEG rw- Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.0.2)
JPM* JP2 rw- JPEG-2000 File Format Syntax (2.3.1)
JPS* JPEG rw- Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.0.2)
JPT* JP2 rw- JPEG-2000 File Format Syntax (2.3.1)
JSON JSON -w+ The image format and characteristics
K25 DNG r-- Kodak Digital Camera Raw Image Format
KDC DNG r-- Kodak Digital Camera Raw Image Format
LABEL* LABEL r-- Image label
M2V MPEG rw+ MPEG Video Stream
M4V MPEG rw+ Raw MPEG-4 Video
MAC* MAC r-- MAC Paint
MAP* MAP rw- Colormap intensities and indices
MASK* MASK rw+ Image Clip Mask
MAT MAT rw+ MATLAB level 5 image format
MATTE* MATTE -w+ MATTE format
MEF DNG r-- Mamiya Raw Image File
MIFF* MIFF rw+ Magick Image File Format
MKV MPEG rw+ Multimedia Container
MNG* PNG rw+ Multiple-image Network Graphics (libpng 1.6.37)
See http://www.libpng.org/pub/mng/ for details about the MNG
format.
MONO* MONO rw- Raw bi-level bitmap
MOV MPEG rw+ MPEG Video Stream
MP4 MPEG rw+ MPEG-4 Video Stream
MPC* MPC rw+ Magick Persistent Cache image format
MPEG MPEG rw+ MPEG Video Stream
MPG MPEG rw+ MPEG Video Stream
MRW DNG r-- Sony (Minolta) Raw Image File
MSL* MSL rw+ Magick Scripting Language
MSVG SVG rw+ ImageMagick's own SVG internal renderer
MTV* MTV rw+ MTV Raytracing image format
MVG* MVG rw- Magick Vector Graphics
NEF DNG r-- Nikon Digital SLR Camera Raw Image File
NRW DNG r-- Nikon Digital SLR Camera Raw Image File
NULL* NULL rw- Constant image of uniform color
ORF DNG r-- Olympus Digital Camera Raw Image File
OTB* OTB rw- On-the-air bitmap
OTF* TTF r-- Open Type font (Freetype 2.10.0)
PAL* UYVY rw- 16bit/pixel interleaved YUV
PALM* PALM rw+ Palm pixmap
PAM* PNM rw+ Common 2-dimensional bitmap format
PANGO* PANGO r-- Pango Markup Language (Pangocairo 1.42.4)
PATTERN* PATTERN r-- Predefined pattern
PBM* PNM rw+ Portable bitmap format (black and white)
PCD* PCD rw- Photo CD
PCDS* PCD rw- Photo CD
PCL PCL rw+ Printer Control Language
PCT* PICT rw- Apple Macintosh QuickDraw/PICT
PCX* PCX rw- ZSoft IBM PC Paintbrush
PDB* PDB rw+ Palm Database ImageViewer Format
PDF PDF rw+ Portable Document Format
PDFA PDF rw+ Portable Document Archive Format
PEF DNG r-- Pentax Electronic File
PES* PES r-- Embrid Embroidery Format
PFA* TTF r-- Postscript Type 1 font (ASCII) (Freetype 2.10.0)
PFB* TTF r-- Postscript Type 1 font (binary) (Freetype 2.10.0)
PFM* PNM rw+ Portable float format
PGM* PNM rw+ Portable graymap format (gray scale)
PGX* PGX rw- JPEG 2000 uncompressed format
PICON* XPM rw- Personal Icon
PICT* PICT rw- Apple Macintosh QuickDraw/PICT
PIX* PIX r-- Alias/Wavefront RLE image format
PJPEG* JPEG rw- Joint Photographic Experts Group JFIF format (libjpeg-turbo 2.0.2)
PLASMA* PLASMA r-- Plasma fractal image
PNG* PNG rw- Portable Network Graphics (libpng 1.6.37)
See http://www.libpng.org/ for details about the PNG format.
PNG00* PNG rw- PNG inheriting bit-depth, color-type from original, if possible
PNG24* PNG rw- opaque or binary transparent 24-bit RGB (zlib 1.2.11)
PNG32* PNG rw- opaque or transparent 32-bit RGBA
PNG48* PNG rw- opaque or binary transparent 48-bit RGB
PNG64* PNG rw- opaque or transparent 64-bit RGBA
PNG8* PNG rw- 8-bit indexed with optional binary transparency
PNM* PNM rw+ Portable anymap
PPM* PNM rw+ Portable pixmap format (color)
PS PS rw+ PostScript
PS2 PS2 -w+ Level II PostScript
PS3 PS3 -w+ Level III PostScript
PSB* PSD rw+ Adobe Large Document Format
PSD* PSD rw+ Adobe Photoshop bitmap
PTIF* TIFF rw+ Pyramid encoded TIFF
PWP* PWP r-- Seattle Film Works
RADIAL-GRADIENT* GRADIENT r-- Gradual radial passing from one shade to another
RAF DNG r-- Fuji CCD-RAW Graphic File
RAS* SUN rw+ SUN Rasterfile
RAW DNG r-- Raw
RGB* RGB rw+ Raw red, green, and blue samples
RGB565* RGB r-- Raw red, green, blue samples in 565 format
RGBA* RGB rw+ Raw red, green, blue, and alpha samples
RGBO* RGB rw+ Raw red, green, blue, and opacity samples
RGF* RGF rw- LEGO Mindstorms EV3 Robot Graphic Format (black and white)
RLA* RLA r-- Alias/Wavefront image
RLE* RLE r-- Utah Run length encoded image
RMF DNG r-- Raw Media Format
RW2 DNG r-- Panasonic Lumix Raw Image
SCR* SCR r-- ZX-Spectrum SCREEN$
SCREENSHOT* SCREENSHO r-- Screen shot
SCT* SCT r-- Scitex HandShake
SFW* SFW r-- Seattle Film Works
SGI* SGI rw+ Irix RGB image
SHTML* HTML -w- Hypertext Markup Language and a client-side image map
SIX* SIXEL rw- DEC SIXEL Graphics Format
SIXEL* SIXEL rw- DEC SIXEL Graphics Format
SPARSE-COLOR* TXT -w+ Sparse Color
SR2 DNG r-- Sony Raw Format 2
SRF DNG r-- Sony Raw Format
STEGANO* STEGANO r-- Steganographic image
SUN* SUN rw+ SUN Rasterfile
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.40.20)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.40.20)
TEXT* TXT r-- Text
TGA* TGA rw- Truevision Targa image
THUMBNAIL* THUMBNAIL -w+ EXIF Profile Thumbnail
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.10)
TIFF64* TIFF rw+ Tagged Image File Format (64-bit) (LIBTIFF, Version 4.0.10)
TILE* TILE r-- Tile image with a texture
TIM* TIM r-- PSX TIM
TM2* TIM2 r-- PS2 TIM2
TTC* TTF r-- TrueType font collection (Freetype 2.10.0)
TTF* TTF r-- TrueType font (Freetype 2.10.0)
TXT* TXT rw+ Text
UBRL* BRAILLE -w- Unicode Text format
UBRL6* BRAILLE -w- Unicode Text format 6dot
UIL* UIL -w- X-Motif UIL table
UYVY* UYVY rw- 16bit/pixel interleaved YUV
VDA* TGA rw- Truevision Targa image
VICAR* VICAR rw- VICAR rasterfile format
VID* VID rw+ Visual Image Directory
VIFF* VIFF rw+ Khoros Visualization image
VIPS* VIPS rw+ VIPS image
VST* TGA rw- Truevision Targa image
WBMP* WBMP rw- Wireless Bitmap (level 0) image
WEBP* WEBP rw- WebP Image Format (libwebp 1.0.2 [020E])
WMF EMF r-- Windows Meta File
WMV MPEG rw+ Windows Media Video
WPG* WPG r-- Word Perfect Graphics
X3F DNG r-- Sigma Camera RAW Picture File
XBM* XBM rw- X Windows system bitmap (black and white)
XC* XC r-- Constant image uniform color
XCF* XCF r-- GIMP image
XPM* XPM rw- X Windows system pixmap (color)
XPS XPS r-- Microsoft XML Paper Specification
XV* VIFF rw+ Khoros Visualization image
YCbCr* YCbCr rw+ Raw Y, Cb, and Cr samples
YCbCrA* YCbCr rw+ Raw Y, Cb, Cr, and alpha samples
YUV* YUV rw- CCIR 601 4:1:1 or 4:2:2
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Unable to generate PNG from SVG

Post by fmw42 »

You are using RSVG renderer -- see the SVG line in your report. You did not have to list everything. I only asked for the SVG line.

It converts fine for me when I use Inkscape with Imagemagick. It is better than RSVG, typically.

You should try using the command line or PHP exec() to call the command line to be sure it is not your Imagick code. If that fails, then try using Inkscape.
som
Posts: 6
Joined: 2019-07-21T07:41:30-07:00
Authentication code: 1152

Re: Unable to generate PNG from SVG

Post by som »

fmw42 wrote: 2019-07-21T22:44:23-07:00 You are using RSVG renderer -- see the SVG line in your report. You did not have to list everything. I only asked for the SVG line.

It converts fine for me when I use Inkscape with Imagemagick. It is better than RSVG, typically.

You should try using the command line or PHP exec() to call the command line to be sure it is not your Imagick code. If that fails, then try using Inkscape.
Thanks !! will try inkscape.
Post Reply