When it comes to web graphics, PNG has long ruled supreme. It’s easy to see why: PNG pulls off the delicate balancing act between a file size that won’t impact too much on page speed and good image quality.
However, PNG is a raster format—and that comes with limitations. That’s why vector imagery has become increasingly popular online, with SVG standing as the current leading vector format. In this article, we’ll show you how you can use Scan2CAD to convert PNG to SVG, alongside the benefits of vectorizing your image.
What is SVG?
SVG, an acronym for Scalable Vector Graphics, is a common vector file format. Like other vector file formats, it contains paths, and displays straight lines and curves whose properties are defined by mathematical formulae.
As the name suggests, a key advantage of SVG is its scalability. This means that an SVG image can be displayed at any size without losing quality. As such, it’s an ideal choice for anyone looking to use multiple sizes of the same image.
Meanwhile, SVG shares another advantage with its fellow vector formats: editability. With SVG, it’s possible to edit each element of an image separately, without changing the image in its entirety. This distinguishes SVG from raster images, whose lack of structure makes them unsuitable for editing.
An SVG file can be created using either a vector image editor, such as Inkscape, or a text editor. If using the latter option, a user will create an XML text file to define the contents of the SVG image.
Unlike DXF and DWG, which are both CAD-oriented formats, SVG’s sights are firmly on the web. Together with PDF, it’s one of few vector formats that virtually all web browsers support. Unlike PDF, however, SVG is easy to embed into a webpage in the same way as a raster image. This makes it the most likely potential candidate to replace raster images for many of their most common uses.
Why not just use PNG?
If you’re unfamiliar with SVG, and are in the habit of using PNG files, you may ask yourself: why would I convert PNG to SVG?
It’s true that there are plenty of advantages to the PNG format, particularly in comparison to other raster file types. That’s because PNG is the all-rounder of raster formats. It beats JPG on image quality, while being much more compact than your average TIFF. Combine those attributes with wide support amongst web browsers, and it’s easy to see why so many online graphics have a .png file extension.
Nonetheless, all raster formats—PNG included—have deficiencies. A key issue is that it’s impossible to zoom into or scale up a PNG without losing some image quality. This wasn’t such a huge problem when virtually everyone viewed the web using a 1024 x 768 resolution screen. Now, however, we use devices of all resolutions and screen sizes to look at the web, creating problems with responsiveness.
If you decide to stick with raster images such as PNG, then there are two ways to deal with responsiveness: accept that some of your users may be looking at a poor-quality version of your image, or create huge images that fit on the biggest screens (for now). There is another option, though: convert PNG to SVG.
Who should convert PNG to SVG?
The first letter of SVG should give us the clue: anyone who needs to scale their images should consider converting to SVG. More specifically, SVG is a great format for anyone looking to display their images at multiple resolutions.
Converting a business logo is a classic example of why you might choose to convert PNG to SVG. You may need to display a logo in places as diverse as a billboard, the navigation bar of your website, on packaging, and in print advertising. Having your image saved as an SVG saves you the hassle of creating multiple differently sized variations of that logo: you simply use the same file for all purposes.
Of course, it’s not only logos that need to come in various sizes. As mentioned above, you can also display many online graphics at a number of different scales. Thankfully, SVG’s wide support amongst web browsers makes this a piece of cake.
A final benefit of SVG is one we mentioned earlier: editing. Using software like Inkscape, you can select and edit each element of your image in isolation. Let’s go back to the earlier example of the logo: with your image saved as an SVG, changing the color of that logo would take mere seconds, with crisp, clean results.
How can I convert PNG to SVG?
In short, there are two ways to complete a PNG-to-SVG conversion: manual and automatic tracing. The two methods work like this:
- With manual tracing, you open up your PNG file in a vector image editor such as Inkscape. You can then vectorize with Inkscape, or other similar software, by creating a new layer on top of your image, and tracing over it using vector entities: lines, shapes, and objects. This option can be useful if your original PNG suffers from some common image problems and is difficult to convert via automatic tracing.
- Automatic tracing, on the other hand, takes mere seconds to complete. All you need to do is import your PNG into vectorization software like Scan2CAD. Then, simply use the appropriate settings for your image, and convert. This is by far the faster option of the two, and can produce great results, so long as you’ve taken care to follow our raster quality checklist.
Before attempting to convert your image, however, make sure you’re aware of what vectorization software can and can’t do. For more details, check out what is (and isn’t) possible when converting photos to CAD.
Why should you use Scan2CAD?
Scan2CAD is the professional, accurate solution for vectorization. Our software comes with a vast range of features to help ensure you get the best conversion results possible, including:
- Raster cleanup tools, such as smoothing, line thickening and thresholding
- Vector editing tools, including drawing, editing and text
- Smart OCR, which recognizes various fonts
- Great vector recognition capabilities
- Support for a wide range of vector and raster file types
With Scan2CAD, you avoid the pitfalls of online converters, and instead get fantastic vector images. To learn more, visit our guide to Scan2CAD: the ultimate vectorization software.