Color filling the interior region of a traced bitmap


I have got a very simple logo in jpg format. The logo is mostly text, think something like "ABC inc." with a very simple styilized shape which merges A, B and C preceding the text. Only two "pure" colors are used.

This logo is used everywhere, resized for every occasion, with an evident degradation of quality. I think (am I right?) that a vector version of it

  1. should be very easily obtained, since I am tracing something which is more traceable than "a drawing", in my case simple geometric shapes and fonts
  2. and should provide for a solution to the image quality degradation.

I have asked the "graphic dept" if they already had a vector version of the logo. Disappointingly for my purposes, they sent me a larger jpg to start with.

So, I have downloaded Inkscape, and I have traced the bitmap. The result, even if not perfect, is very good (mainly because the font has sharp angles, while the tracing uses smooth curves and so there is a "roundish" feel to the letters.

Now I would like to fill the (interior region of the) traced shape with the original colors. The trouble is that the "fill" tool doesn't work like I am accustomed to in an image editing program (say, Gimp). In particular, it doesn't "fill" the shape but it is apparently "tracing" another path within mine: and so while a good approximation, one can clearly see the "white" space between the two shapes.

What am I doing wrong, and how can I rectify it? I can live with a "rounded" text, at least as a first approximation. But the white space between the boundary and the interior region is so evident that it is not acceptable.

Please note: I am a complete beginner in the field of vector imaging. So I am aware that my approach could be easily wrong from the first step, and the whole question may be "missing it".

UPDATE: as requested, I am adding an example. This is a "dot", like at the end of "Inc.":

a dot.

As you can see, when I filled the interior of the dot, a white space remained around. What am I doing wrong?

6/18/2013 5:15:00 PM

Accepted Answer

The thing you're doing wrong is thinking in raster :)

The fill tool is actual pretty useless for neat design. What it does is basically take a raster version of what's on the screen, then find the "area" clicked in a similar way to a raster editor (photoshop, gimp), then creates a vector shape that roughly covers that area. Because of the conversion to raster and back again, you loose some fidelity, and the fill tool is conservative, in doesn't go over outlines.

There are a couple of ways to do it. You could manually draw a rough outline of the area you want to fill, with the bezier tool (which will give you the minimal number of nodes needed, saving some space) like this:

R with fill object

Then fill it with what ever colour you want, and lower it below the outlining shape (in this case the R), using Object > Lower (PgDn):

R filled

You could also use the Fill tool as you have done, and then use the Path > Outset tool a few times, to make the filled vector large enough to overlap the outlining object.

7/12/2013 6:46:00 AM

You are correct that vector files do not degrade when scaled, copied, or resaved.

It's disheartening to hear anyone state "I can live with rounded corners" for a logo. That's not what branding is about. If the original does not have rounded corners, then you do not have the logo at all. Any logo should appear identical in all cases. The use of sharp serifs or type could very well be intentional and used to portray a specific aspect of the logo.

For example, each of these items conveys a very different message and the only change is the serifs.


To address the issues....

In reality straight geometric shapes are more difficult for auto trace features. Most auto trace features don't look for "straight" specifically. They don't pay attention to perpendiculars or other standard vertical/horizontal associations. For this reason tracing results are almost always better on non-geometric shapes.

If the company is well-known, you may try searching for a vector version of the logo. You can also try a simply Google Image search as well, something along the lines of [ company name logo vector ] can find vector versions of a logo. You can also use Google to search a companies web site for a PDF containing the logo [ site: -filetype:PDF ]. Often logos used in PDFs are vector in nature and can be extracted from the PDF.

Back to tracing, while I'm not familiar with Inkscape tracing features, in most cases to refine results it's a matter of adjusting the Threshold options for the tracing. Increasing threshold will result int he tracing seeing less grey. Essentially increasing contrast for the tracing. If you are getting round corners where there are none, you may want to try reducing any contrast or threshold setting for the tracing.

As for filling pieces after the trace, it's difficult to say without seeing the trace itself. However, using any vector application, all one traditionally needs to do is to select the path/shape and then choose a fill color. To remove any exterior white area, simply select it, by clicking it with the cursor and delete it.

If fill colors are not being applied as you expect it would lead to the conclusion that the tracing is not constructed in a manner which is conducive to easy fills. This may mean that autotrace will not yield the results you need. A better method may be to simply place the jpg/png you have, grab the Pen Tool and manually recreate the shapes. If the logo is a straight font, as many often are nowadays, you may be able to simply track down the font used for the logo.

My first option would be to ask the designers again specifically for a vector format of the logo. Some design departments will just send jpg or png files to random requests because 80% or more of people don't really need a vector format. Often "vector" is a buzzword and is used by those that don't really understand the difference. It's not uncommon to send a second request stating something like "I really appreciate you sending the jpg/png. However, my primary concern is to maintain the integrity of your brand and I would really benefit more from a vector format if you have one available."


Given you sample "dot" I would not be tracing anything. All you need for that is the Ellipse tool. Draw three circles. Tracing only makes sense if the art you are trying to create can not be easily created in other ways.