Conversion of text containing svg file to png doesn't works!
Conversion of text containing svg file to png doesn't works!
While converting Text contained svg file to png I got a blank png image as a result . The file is totally blank . Is there any solution for converting text containing svg file to png?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Conversion of text containing svg file to png doesn't wo
Please say what version of IM and platform you are using.
Please tell us the exact command you used.
Please supply an SVG file that shows the problem. Paste the contents here between [ code ] and [ /code ].
Please tell us the exact command you used.
Please supply an SVG file that shows the problem. Paste the contents here between [ code ] and [ /code ].
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion of text containing svg file to png doesn't wo
Topic moved to the correct forum.
Re: Conversion of text containing svg file to png doesn't wo
I am using IM 6.8.9-0 and MAC.
The command is
Here the text file:
https://dl.dropboxusercontent.com/s/7rh ... 1401191582
-----
output file -
https://www.dropbox.com/s/r65xbmiktok2ylk/test1.png
The command is
Code: Select all
"convert Shapefont.svg -resize 770x515! -quality 100 test1.png
https://dl.dropboxusercontent.com/s/7rh ... 1401191582
-----
output file -
https://www.dropbox.com/s/r65xbmiktok2ylk/test1.png
Last edited by Ganesha on 2014-07-31T23:59:06-07:00, edited 2 times in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Conversion of text containing svg file to png doesn't wo
Your command makes no sense. It has an input with no output. (Or perhaps an output with no input.)
You haven't pasted the contents of your SVG file between [ code] and [ /code] markers.
You haven't pasted the contents of your SVG file between [ code] and [ /code] markers.
snibgo's IM pages: im.snibgo.com
Re: Conversion of text containing svg file to png doesn't wo
Sorry that was typo error can you check now @snibgo
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Conversion of text containing svg file to png doesn't wo
The SVG specifies a viewbox of 6.47 x 2.32 pixels. So that is the size of the generated image, rounded to 6x2 pixels. When you resize this to 770x515, the image is not interesting.
The default density for SVG is 90 dpi. To render the width as 770 pixels, multiply the density by 770/6.47. So you want a density of 90*770/6.47 = 10710.97
The result is better, though not correct. Rather than use such extreme densities, it would be better to fix the SVG. What created it?
(My tests used IM v6.8.9-5 using Inkscape to render the SVG.)
The default density for SVG is 90 dpi. To render the width as 770 pixels, multiply the density by 770/6.47. So you want a density of 90*770/6.47 = 10710.97
Code: Select all
convert -density 10710.97 shapefont.svg s.png
(My tests used IM v6.8.9-5 using Inkscape to render the SVG.)
snibgo's IM pages: im.snibgo.com