How to Extract Text From Images on Linux With TextSnatcher

2022-07-16 01:34:37 By : Ms. Christy Pan

Using CLI tools to OCR an image can be nerve-wracking for some users. TextSnatcher is the best graphical app to extract text from images on Linux.

Being able to copy text from images is a neat little trick that allows you to extract a piece of information from an image, perhaps to copy a text snippet in it or note down an error message appearing on the screen.

Since Linux doesn't have a built-in OCR utility, you have to resort to third-party OCR readers. But because most of these are CLI-based tools, they aren't very user-friendly.

Here's where TextSnatcher comes in. It's a simple and intuitive program that makes it really easy to copy text from images on Linux. Let's dive in to learn more.

TextSnatcher is essentially a front-end for the Tesseract OCR engine: one of the popular OCR engines used by various operating systems. As a result, in addition to being easy to use, the tool is also fast and accurate at recognizing characters.

TextSnatcher supports multiple languages: English, Chinese, Japanese, Spanish, French, German, and Arabic. So you can easily extract text from images containing these languages.

TextSnatcher is compatible with all major Linux distros and you can install it in a few ways. Follow the instructions below to install it on your system.

If you're using Ubuntu, Linux Mint, or any other distro on your machine, you can install TextSnatcher from Flathub. To do this, first, make sure your system has Flatpak. You can do this by opening a terminal and running this command:

If this returns a version, you have Flatpak installed on your system. Else, you'll need to install it first, which you can do using our detailed Flatpak guide.

Next, enter the following command to install TextSnatcher:

On the other hand, if you're using elementary OS, you can download TextSnatcher from the AppCenter using the link below.

Alternatively, if you want to build TextSnatcher from the source—perhaps because you want a specific version—you can do that too. However, you'll also need to install the following dependencies if you decide to go this route:

Once you've installed these, run the following command in the terminal to clone the TextSnatcher repository:

Then, navigate to the TextSnatcher directory using:

Now build the program with Meson:

Change the directory to build using the cd command:

And finally, install it by running:

Once you've installed TextSnatcher, using it is pretty easy.

Start by opening the applications menu. Then, search for TextSnatcher and launch it. You'll be greeted with a tiny TextSnatcher window. Resize this window to your preference so that it's easier for you to perform operations on it.

Next, choose a language you want to extract from an image. To do this, tap the flag icon on the left-hand corner of the window and select a language from the available languages.

With the language selected, the next thing you need to do is supply the image from which you want to extract text to TextSnatcher. There are three different ways to do this:

To access these options, hit the Snatch Now button on the TextSnatcher home screen, and it will show you these three options on the following screen:

If you'd like to extract text from your screen, the easiest way to do it is to capture a screenshot of the screen and then pass it to TextSnatcher to extract the text.

For this, click on the Take Screenshot button.

TextSnatcher will now start the scrot screenshot utility and present you with a crosshair cursor. Use it to draw out the area around the text you want to extract to take its screenshot.

Wait for a few seconds. TextSnatcher will process the text and add it to your clipboard. Open any note-taking program on your computer and use the Ctrl + V shortcut or right-click on the empty space and select Paste to paste and view the copied text from the image.

Another way to feed an image into TextSnatcher is to upload it. This is useful when you've already taken a screenshot of the content you want in text or already have an image that contains the text you want on your computer.

To use this method, click on the Choose File button.

When TextSnatcher opens the file manager, choose the file you want to upload and hit Open or Ok to upload it.

Once the image is uploaded, TextSnatcher will read it and save its text to your clipboard, which you can see as you did in the previous option.

Similarly, you can also use the Get from Clipboard option to feed in an image to TextSnatcher to extract text from it. However, bear in mind that this functionality is a hit-or-miss at the moment, particularly on systems using the X11 window manager. We were able to get it to work on some occasions, whereas, other times, it just threw an error.

But here, too, the idea is simple. You need to copy the image from which you want to extract text to your clipboard. After that, TextSnatcher will check your clipboard to find the image and extract text from it.

TextSnatcher makes it really easy to extract text from images on Linux. It works really fast, as it promises, and is pretty easy to use. In addition, the multi-language support allows you to use the program to extract text in other languages too, which is a neat touch.

So now, every time there's text on a website, PDF file, lecture notes, or videos, you can pull up TextSnatcher to extract text from it easily and save it in a note-taking program on your computer.

Conversely, if you prefer online tools, there are a few websites that let you convert images to text for free that you can check out instead.

Yash is a Staff Writer at MUO for DIY, Linux, Programming, and Security. Before finding his passion in writing, he used to develop for the web and iOS. You can also find his writing on TechPP, where he covers other verticals. Other than tech, he enjoys talking about astronomy, Formula 1, and watches.

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!