Generating svg images using convert "command line"
Posted: 2009-08-09T10:19:32-07:00
Hello,
I'm using ImageMagick command line tool (convert) to generate svg images.
First, I tried this command to generate an image with two circle
convert -size 100x100 -draw 'circle 20,20 10,10' -draw 'circle 30,30 50,50' xc: test.svg
It worked correctly but it generated the last circle only
I changed it to
convert -size 100x100 -draw 'circle 20,20 10,10 circle 30,30 50,50' xc: test.svg
and it generated the two circles correctly. However, it didn't respect any of the attributes like fill and stroke. The resulted circles were always black and solid.
My questions are
1) Do I really have to write all my drawing commands in one draw argument (like the second example)?
2) Can I use graphics settings like stroke, strokewidth and fill to draw svg images? how?
3) Can I use DIFFERENT colors for the same svg image? how?
I'm running this version
Version: ImageMagick 6.5.4-2 2009-07-07 Q8 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Which is compiled from source on my Ubuntu 9.04 machine.
Thanks in advance.
I'm using ImageMagick command line tool (convert) to generate svg images.
First, I tried this command to generate an image with two circle
convert -size 100x100 -draw 'circle 20,20 10,10' -draw 'circle 30,30 50,50' xc: test.svg
It worked correctly but it generated the last circle only
I changed it to
convert -size 100x100 -draw 'circle 20,20 10,10 circle 30,30 50,50' xc: test.svg
and it generated the two circles correctly. However, it didn't respect any of the attributes like fill and stroke. The resulted circles were always black and solid.
My questions are
1) Do I really have to write all my drawing commands in one draw argument (like the second example)?
2) Can I use graphics settings like stroke, strokewidth and fill to draw svg images? how?
3) Can I use DIFFERENT colors for the same svg image? how?
I'm running this version
Version: ImageMagick 6.5.4-2 2009-07-07 Q8 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Which is compiled from source on my Ubuntu 9.04 machine.
Thanks in advance.