Hi All,
I am new to the Imagemagick api.. and so forgive me if this is a silly question...
I am writing an effect which would apply stroke for fonts...
So I read a png image using Image Magick and would like to convert this to a vector format (SVG) which is supported in image magick
as i have built magick with the autotrace library..
code...
Magick::Image im1;
im1.read("D:/Test/abc.png");
im1.write("D:/Test/abc.svg");
..................
My questions are as follows..
1)Can I get the path of this SVG data in memory without actually saving an SVG file in the hard disk
2)How do I apply stroke to this svg file using the C++ api
Thanks in advance
Praveen
Stroking an SVG file
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stroking an SVG file
IM is not a good app for converting raster to vector
see http://www.imagemagick.org/Usage/formats/#vector
see http://www.imagemagick.org/Usage/formats/#vector
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stroking an SVG file
SVG is a text format -- extract it from that file!
See... http://www.imagemagick.org/Usage/transform/#edge_vector
I do exactly that so I can modify the results to get a clean outline of a bitmap shape.
See... http://www.imagemagick.org/Usage/transform/#edge_vector
I do exactly that so I can modify the results to get a clean outline of a bitmap shape.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Stroking an SVG file
Hi,
Thanks for the help...
I have got it to work the way u say...but i still have to write an svg file and extract info from that..Is there no way I can get the entire svg information into memory without actually writing into a file...
Thanks
Praveen
Thanks for the help...
I have got it to work the way u say...but i still have to write an svg file and extract info from that..Is there no way I can get the entire svg information into memory without actually writing into a file...
Thanks
Praveen
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stroking an SVG file
Well... Not really.
IM draw (using the internal MSVG decoder) does have a method of outputing the draw statements as IM draw operations. This however is for debugging, it is stored internally but their is no way to access.
In any case IM is a raster image processor, not a vector processor, so really this is beyond its scope.
IM draw (using the internal MSVG decoder) does have a method of outputing the draw statements as IM draw operations. This however is for debugging, it is stored internally but their is no way to access.
In any case IM is a raster image processor, not a vector processor, so really this is beyond its scope.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/