How to Convert/Recreate PNG Logos to SVG With Inkscape
Bitmaps tend to have noise and imperfections, especially if they’ve been generated by AI. Vector graphics, on the other hand, trace the outline of elements with elegant curves. Converting from the real world of bitmaps to the ideal world of vectors requires ignoring the actual pixels and seeing an idealized structure instead. That is not something automated conversion tools can do today, at least not those I’ve tested. Instead of converting a PNG to SVG you should, therefore, recreate it in a vector graphics image editor. This article shows how to do that in the free Inkscape.
Situation
Please note that I’m in no way a computer graphics professional and only marginally familiar with Inkscape. However, the process I’m describing below worked well enough for me to warrant documentation for my future self and potentially others who are in a similar situation I was in:
I had used AI to generate a logo for an open source project I’m working on. This gave me a medium-sized PNG with rather a lot of artifacts that either looked like noise from lossy compression (although PNGs are compressed losslessly) or were imperfections in the logo’s outline. As I needed a higher-resolution version of the logo, any kind of upscaling was out of the question. The image quality simply wasn’t good enough. So conversion to SVG was on the agenda.
I tried several automated conversion services online as well as Inkscape’s “Trace Bitmap” feature. None of them produced even remotely acceptable results that might have been useful as a basis for manual correction. So I turned to recreation in Inkscape instead.
Recreating Bitmap Logos in Inkscape
Process
I’ve used the following simple process to recreate a PNG logo as a vector graphic in Inkscape:
- Start Inkscape with an empty document.
- Open the source PNG version of the logo to be converted.
- Open Layers and Objects (
Ctrl + Shift + l
), select the entire image and set its opacity to 50% in the lower-left corner. - Identify individual regions of the logo that can be drawn as one path. Focus on the broad outline. It’s easy to cut away parts later.
- Draw the outline of a logo region as described below.
- Remove sections from the outline as described below.
- Fill the new path object with a color of your choice.
- Repeat the above process for other regions of the logo.
- Delete the
image1
layer. - Export your finalized logo to PNG (
Ctrl + Shift + e
) in any required sizes. - Save the drawing as Inkscape SVG.
Drawing Logo Regions
This is how I drew individual regions of the logo:
- Select the Pen tool (
b
), which draws straight lines and Bézier curves. - Start drawing the logo outline as straight lines by setting points at strategic locations.
- Press
Ctrl
for straight lines. - Use as few points as possible.
- Make sure to close the path.
- Press
- Switch to the Node tool (
n
) to edit the path you created. - Work on one path segment after another.
- Click and drag a segment to convert it from a straight line to a curve.
- Selecting a point makes handles appear. Use them on either end of a curve to bend the curve so that it matches the logo’s outline.
- Where necessary, add additional points by double-clicking the curve.
Removing Sections from a Logo Region
To remove (cut away) sections from a logo region:
- Select the Pen tool (
b
) to draw a new shape corresponding to the logo section you want to remove from a larger region path object. - Modify the section path with the Node tool (
n
) as required. - Once you’re happy with the section, go to Layers and Objects (
Ctrl + Shift + l
), making sure that the new section path is directly above the larger region path (from which you want to cut away). - Select both paths and click Path > Difference (
Ctrl + Shift + -
).