How to Import Images into LibreCAD

Updated Jan 3, 2022
office computer desk, scan2cad logo

LibreCAD is one of the more well-known free CAD solutions in the market. It’s not uncommon to see professionals using LibreCAD as an economical CAD alternative for more streamlined drafting processes. But the program is more typically used by newer CAD drafters and students – those that want to dip their toes into the world of CAD without spending too much on paid software. And unlike some other open-source programs available, LibreCAD boasts functionality and interface concepts that very closely resemble that of the industry-standard AutoCAD. Those looking to get into AutoCAD very often practice on LibreCAD for a smoother transition when they finally decide to purchase the former.

If you’re just getting into LibreCAD, you’ll find that a frequent requirement for most CAD work would be to use a reference image and create a CAD file out of that. It’s a fairly straightforward process but can be confusing for first-time drafters.

The standard LibreCAD interface

The standard LibreCAD interface Source

In this article, we’ll be covering a bunch of topics ranging from image file types, image conversion methods, and vectorization processes. Since it’s always on a case-by-case basis when it comes to dealing with the different types of image files available, we’ll do our best to cover anything and everything that can help you master the art of importing images into LibreCAD.

Video: How to convert images for LibreCAD

View video transcript

LibreCAD is a nice piece of software but it gets kind of tricky when you try to import different image files into it. With the raster files, you’ll have to trace over them to vectorize them, and when it comes to vector files, it can only really handle its native DXF vector file. Today, I’m gonna be showing you how to use Scan2CAD to convert either raster or vector images into a DXF file format that you can open up on LibreCAD. Let’s open up a sample floor plan raster file here. In this case, you want to first clean this up, convert into a vector file and then save it as a DXF file. So let’s clean up the image by clicking on clean image here in the upper left. Now normally, you would want the click on threshold to turn the image black and white. In this case, the option isn’t available because the original image is already black and white. You’ll see that if the image is already black and white, it’s going to be grayed out like this one, and it won’t be possible to click on it. But if it is possible, always go for the option of clicking on threshold.

Now, we have a couple of clean image options here. Remove speckles and holes to remove any visible graphic noise or holes that we can find in the image. In this case, this is a pretty clean image so there’s no need for us to use that. Thicken lines just makes thinner lines more visible, and it kind of tries to smooth out these jagged edges like this one. Let’s see what happens if we click on this image. See, it does kind of make it… It’s a little bit more neat. Now, we can click on okay to execute the changes into the raster file. There are a couple of other editing options here. The main things you might want to consider are the erase duo for any speckles or holes or anything you might want to erase in the image that you don’t want to include in the vectorization.

And we also have some other drawing tools such as draw line, draw arc, and draw Bézier. You can even draw rectangles and circles and other polygons here. If you want, you can also add text here if that’s something that you might want to do before vectorizing the image. Okay, so say that we’re okay with the edit here and we’ve cleaned up the image as much as we can, we just have to click on convert raster image here on the upper left right next to the clean image button. In this case, I think we might want to stick to the Technical Vectorization method. And since we do have some text objects in the original raster image, I’m going to click on vectorize and OCR. The OCR function just converts those text images into editable text. As for vectorization presets, let’s stick with the default architectural. There are a couple of presets that you can also choose, but usually when you’re working with LibreCAD, it’s either Architectural or Electrical or Mechanical house. You can try to exploit the other ones if that’s more appropriate for your own image.

Technical vectorizing OCR, when you click on vectorizing OCR, a new OCR tab is going to pop up here. So click on that, set some of the settings right. For the character size, let’s set the maximum character size by clicking on select from image, looking for the largest text here. I think it might be the room labels, so let’s zoom into any one of those, and then click and drag across its height to set the maximum character size automatically. Now, if you have any vertical or horizontal text, you would also want to click on these two. In this case, there aren’t any vertical and angular text, so I’m gonna leave those unticked. If you tick those without needing them, then it might turn out some false positives in the final image, so don’t tick them if you don’t need to tick them. Okay, now with all of the OCR headings done, let’s go back to general and double check all the settings that we have. This seems okay so I’m gonna click on run here. This is the part of the process… It might take a while depending on how complex the image is. In this case, it wasn’t a very complex image so it converted very quickly.

This is the converted vector. This is the original raster. If you wanna see both of them in the same page, just click on both to see the vector on top of the raster, and to make the vector more visible, you click on highlight vectors. It followed a lot of the lines pretty cleanly and pretty well. I think I’m happy with that. If you’re happy with this, you click on okay to execute the changes and now we have a vector file that you can save. There are some text objects that might not have converted well, so if you want to correct those, just go to the both tab once again, click on highlight vectors here. You can erase these vector polylines by clicking on erase here, and then just typing this up. If I recall, the biggest text here was like around 48, so this might be a bit smaller than 48, maybe 30, but you can always change the sizes later. Click on down, type in down rather. See, these are actually pretty big too, so let’s make that a little bit smaller and see if 20 is okay. That seems better. And then, you can just remove this by clicking on the corner on the upper left. Alternatively, you can actually just click on step and just add down here as well. I’m trying to show you that you can actually add additional text.

Going back to the vector tab, if you’re happy with what you see here, if you don’t need to do any more edits using the edit tools on the left, or if you have any major edits which wouldn’t be super conducive if you use on Scan2CAD, you might wanna do that on your preferred CAD software, in this case, LibreCAD. If you’re happy with this, just click on export here on the upper right. You can use either one of these DXF files. I figure these are R14 and R14 and later by default. It’s the latest DXF version so R14 and later. And then you can just name it whatever you wanna name it. Click on save. Now an additional note… Oh, also, it depends on what settings you have on your LibreCAD, but by default, I think that the background of LibreCAD is going to be a dark color. So you’re gonna want to have this ticked because by default, these vector lines are gonna be black. So they’re going to be hard to see against a dark LibreCAD background. You’re gonna want to click this to make these black vectors white and more visible in front of a dark-colored LibreCAD background. You can just click on okay then you can see the changes.

One last thing before I leave you guys, I’ve showed you the process of how to convert a raster image into a vector DXF file for LibreCAD, but what if you have a vector file that you want to convert? It’s actually an easier process. When you open up the vector file, it’s gonna be opened up automatically into a vector tab. No need to clean up the image and do the whole process of cleaning up the original raster lines here. It’s just gonna open up directly on vector, so all you need to do is double check everything, see if it’s okay, no need for edits, and then click on export on the upper right and save it as a DXF, and you should be good. That’s basically how to use Scan2CAD to convert either a raster file or a vector file into a DXF file that you can use on LibreCAD.

Image types: raster vs. vector

Although the ideal world would be one where we didn’t have to deal with literally hundreds of different image file types, that sadly isn’t the case. So before we talk about converting images into a format that LibreCAD can handle, our first consideration will have to be the image file type we’re dealing with.

To keep things simple, we’ll talk about just the two major types of image files that we’ll most likely come across – raster image files and vector image files. Vector files are a bit easier to deal with since CAD files are, by default, also vector image files. But you’ll more often be dealing with raster files and it’s a little tricker to get these LibreCAD-ready, so we’ll get into detail about converting raster files first.

Raster images

The reason we mention that you’ll often be dealing with raster file types is that it’s also the standard way for images to be digitized. The most common formats such as PNG, GIF, JPEG, and BMP are all examples of raster files. They’re made up of individual tiny pixels and their quality is defined by their resolution size or the number of pixels they have in the image.

An easy way to tell whether an image is a raster file or not is to zoom in – if it gets blurrier the closer you zoom in, chances are that it’s a raster file. And it’s this blurriness that makes working with pixelated or low-quality raster files difficult in LibreCAD.

Here’s the basic process of opening up your standard raster image on LibreCAD:

Opening a raster image in LibreCAD

Step 1

Click on File > Import > Insert Image. In the dialog window that pops up, locate your image file and open it up.

Step 2

With your crosshair cursors, click where you want to place the lower-left corner of your image.

Step 3

At this point, you’ll want to take the time to calibrate certain details of your image such as its scale, the layer it’s on, and its transparency. You can use LibreCAD’s various drafting and editing tools to get the image just right.

Step 4

From here, we’re done with most of the complicated importing work, so it’s time to start with the tedious process of manually tracing over the imported image. Take the various vector tools of LibreCAD and trace over the details you want to vectorize. Depending on the complexity of the image, this could take from a few minutes to hours and days of working time.

So as you can see, LibreCAD can import raster files without a hitch. But the lines and details on the image can’t be edited natively. CAD programs draw using vector lines so editing raster pixels isn’t something it can do easily. And there isn’t a magic button that instantly sharpens low-res photos like the one they have on CSI-esque shows, so you’ll have to do a lot of guesswork to accurately depict bad reference pics as LibreCAD files.

Depending on the quality of the image, there might be a lot of manual work that needs to be done to get a raster image to work on LibreCAD. Luckily, like in the video we showed earlier, there are automatic conversion solutions that are available. Scan2CAD, in particular, stands out for its advanced object recognition, accurate OCR capabilities, and user-friendly interface.

Smooth vector images and pixelated raster images

Smooth vector images and pixelated raster images Source

Vector images

If you find yourself dealing with a vector image for use on LibreCAD, you’ll generally have an easier time handling and importing the file. The native file format on LibreCAD is AutoCAD DXF, a good example of a standard vector file format for CAD programs. Aside from DXF, other common vector file types include DWG, g-code formats, and certain PDF documents.

The main difference that vector images have with raster images is their use of paths instead of pixels. Basically, paths are mathematical equations and digital data that dictate the specifics of how an element of the image – be it a line, arc, circle, or shape – is visually represented. As such, vector file elements will always be clear and sharp regardless of how much you zoom in on them. As such, vector files aren’t limited by their resolution and file size, unlike their raster image counterparts.

Do note that although LibreCAD can marginally support DWG files, it can only reliably open and handle DXF files. So you’ll have to first convert your vector files into DXF files before you can freely import them into LibreCAD with no issue. The video earlier showed earlier goes through the process but we’ll cover the specific details in a bit.

For now, just know that if your vector image is a DXF file, all you really have to do is open it up on LibreCAD as you would any CAD file that was produced on LibreCAD. It’s truly as simple as that.

Converting images into DXF files for LibreCAD

In cases where you don’t have the time to manually trace over raster images or when you have non-DXF vector images that you absolutely need to import into LibreCAD, automatic file conversion would be your best bet.

Let’s go through how Scan2CAD is the only option for high-quality, straightforward file conversions for CAD programs.

Converting a raster floor plan on Scan2CAD

Converting a raster floor plan on Scan2CAD

Converting an image for LibreCAD

Step 1

Open up your image on Scan2CAD. If it’s a raster image, proceed to Step 2. If it’s a vector image, skip to Step 5.

Step 2

Clean up your raster image. Click on the ‘Clean Image’ button at the top left of the interface and use the following tools at your discretion.

 

Image Processing Feature

When To Use It

Threshold

To turn your image black & white. Always click on this first for raster images unless it’s already grayed out. If the option is grayed out, that means the image is already black & white.

Remove Speckles & Holes

To get rid of any pixel speckles or holes in your image. Set the values higher to get rid of more noise in the image but be careful not to set it too high that it starts erasing parts of the image you want to keep.

Thicken Lines

To make thin lines in your raster image more visible.

Smooth

To smoothen out any jagged or pixelated edges in your raster image.

Step 3
Use the editing tools on the left of the image to manually add raster lines or erase any raster elements.

Step 4

Click on ‘Convert raster image’ next to the ‘Clean Image’ button. For most technical drawings you want to import into LibreCAD, choose the following options.

 

Vectorization Feature

Recommended Option

Vectorization Method

Technical

Options

‘Vectorize’ for textless images; ‘Vectorize and OCR’ for raster images with text.

Vectorization presets 

A wide variety of options are available depending on the type of drawing you’re dealing with.


Step 5

Click on ‘Run’ to generate a vector preview and click on ‘OK’ if the preview is up to par with your standards.

If there are some details in your vector image that you want to finetune such as optimizing the vector elements, converting polyline vector texts into TrueType text, or smoothing vector lines for CNC cutting, click on ‘Convert vector image’.

‘Convert Vector Image’ Option

Description

Optimize vectors

Various options to calibrate the vector lines exactly how you want them. Has a useful tool that gets rid of any OCR text that you don’t want to include in your final product.

CNC Smoothing

Takes care of segmented arcs or curves made of polylines. Typically used for CNC purposes.

OCR

Converts polyline text into vector TrueType text.

Click on ‘Run’ to see your settings on a preview image and click on ‘OK’ to finalize those changes.

Step 6

Once you’re happy with your vector image, click on ‘Export’ on the top right. Choose the location you want to save it, pick DXF as the file format, and name your file accordingly. Click on ‘Save’ once you’re done.

A few extra settings will show up; make sure you tick on ‘Convert black vectors to white’ – LibreCAD has a dark-colored background so you want to have white vector lines for the sake of visibility and convenience.

With a process this easy and straight-forward, there’s very little reason to choose anything other than Scan2CAD for your LibreCAD importing needs.

scan2cad advert for free trial