3

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.

4
  • @Whoever_made_the_vote_to_close_this Putting the reason will help me to modify the title or delete it. I am matured enough to think about the reason without making revenging of downvoting that person. Mar 6, 2014 at 6:42
  • Your gross misuse of tags will probably only lead to more people voting to close. Please don't do that again regardless.
    – BoltClock
    Mar 7, 2014 at 0:06
  • @BoltClock Ok. Sorry. But that down vote happened even before that. Mar 14, 2014 at 4:50
  • Try this github.com/chiggum/mindthegap with noisy switch (-z) if the input image has blended colors and change the number of desired colors in output using (-n <num>). Mar 14, 2018 at 9:38

2 Answers 2

14

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.

8

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

3
  • So, if I use the .bmp file instead of .png file. Will it work properly? Mar 6, 2014 at 7:00
  • Both .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. Mar 6, 2014 at 7:04
  • I 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.
    – jsbueno
    Mar 7, 2014 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.