Inkscape - Not fully converting png into svg
Solution 1
A .png file is a raster image file. In order to convert it to a vector graphic based format like .svg and have it be "native" svg rather than an included image
you are going to either have to use a program that can rasterize it or in Inkscape trace the bitmap and turn it into paths. Inkscape provides information on tracing: http://inkscape.org/doc/tracing/tutorial-tracing.html
Solution 2
This is a bit of an old thread, but it comes up early in Google so I thought I'd contribute something.
In Inkscape, you must do a trace to change the image into SVG. Look at the Path | Trace bitmap menu item and play with the options on that screen.
After creating the trace, you can remove your source image and have a pure svg in your saved file.
I've found it helpful to create layers in Inkscape and move the source image to one layer and put the trace on another layer to let me make quick comparisons using the 'hide layer' buttons.
BTW, your source image can be anything - bmp, jpg, png, etc.
prabhakaran
A newbie to qt,openGL,NetworkProgramming Know python,perl,shell scripting. A well versed(medium level) C++,linux,perl,c# programmer Crawling around javascript,xul and new technologies. I am a Linux lover got tricked into windows.
Updated on June 27, 2022Comments
-
prabhakaran almost 2 years
I opened one PNG file in Inkscape and exported it as SVG. When I opened that file with notepad I came to know that the PNG file is embedded within it. If the conversion happened then the resulting file should have only SVG related tags. It shouldn't embed the image within it. Or Am I doing anything wrong.
Note: Save as option also producing the same kind of file. I am using Inkscape version 0.48 in Windows 7 - 64 bit.
-
prabhakaran about 10 yearsSo, if I use the .bmp file instead of .png file. Will it work properly?
-
Jason Aller about 10 yearsBoth .bmp and .png files store their images as raster graphics. To convert from raster graphics (bitmaps telling which color to put in which pixel) to vector graphics (line, path, rectangle) you need to use a process other than just saving the file, either manual, or one like the tracing method linked in the answer.
-
jsbueno about 10 yearsI am not sure if bmp files are ok to be embedded according to the SVG specs - but attempt to the fact that usually BMP files have no compression at all: which means you can end up with a file 10-100 x larger than a file with a embedded png image.