TextSnatcher: How to Copy Text from Images in Linux?

Extracting text from media like images isn’t new technology in the market. Google-like company is already trying to implement OCR in Vision API to implement text detection in their native image tool or photo managers.

In Linux, we have multiple tools to snitch text from the images. Textsnatcher is another one of its kind. This tool performs optical character recognition (OCR) in a couple of seconds, allowing you to copy anything from the image to your system clipboard easily.

Features

  • Support multiple language.
  • Copy text from active window.
  • Copy text from images with a drag.
  • Drag over any images and paste.
  • Uses OCR4.x for the character recognition.

Install TextSnatcher

Textsnatcher is available for Arch-based distribution within aur repository. Other distributions like Ubuntu/Debian or RedHat can use the flathub packages or build it from its source to install textsnatcher on their system.

Arch and Manjaro

$ sudo pacman -Sy textsnatcher-git

Flathub

Debian or Ubuntu users can go with flathub package of this tool. Make sure to install flathub in your system and then use the below command to install textsnatcher on your system by downloading it from flatpak repository.

$ flatpak install flathub com.github.rajsolai.textsnatcher

Once the tool is downloaded and installed correctly, use the below command to run it from the command line.

$ flatpak run com.github.rajsolai.textsnatcher

Install from the source, build and run

# clone repository
git clone https://github.com/RajSolai/TextSnatcher.git TextSnatcher
# cd to dir
cd TextSnatcher
# run meson
meson build --prefix=/usr
# cd to build, build and test
cd build
sudo ninja install && com.github.rajsolai.textsnatcher

How to use TextSnatcher

Usage is pretty straightforward; once you install the application using any of the methods as mentioned earlier, open it.

TextSnatcher
TextSnatcher

Once the above window appears, open your image simultaneously and click on the “Snatch Now!” button.

TextSnatcher Option
TextSnatcher Option

After clicking the “Snatch Now!” button, the above window will appear with multiple options. You can grab the whole screen or select the current window, but I mostly recommend you to go with the “Select area to grab” option.

You can also arrange the delay in seconds before extracting the text from the image, and the default is one second. Once you are done, click on the “Take Screenshot” button, and the pointer will appear. I assume you already opened the image, so use the pointer and select the text content inside the image to copy, and a new window will appear with the text content you choose inside the image.

Copying text to clipboard
Copying text to clipboard

Once the above window appears, click on the share button, and it will copy the content of the image into your clipboard.

Leave a Reply