TextSnatcher: Copy text from images, for the Linux Desktop

Tool and basic approach

  • TextSnatcher uses scrot (via portals) and Tesseract with default settings and no extra preprocessing.
  • It’s packaged as a Flatpak; Tesseract is bundled in the Flatpak manifest.
  • Works reasonably for clean UI text and dialogs, but struggles on noisy / skewed images and is not suitable for CAPTCHAs.

Shell script alternatives and refinements

  • Multiple users share near-identical Bash scripts: take region screenshot, optionally preprocess with ImageMagick (e.g., grayscale and 4× resize), feed to Tesseract, copy to clipboard, show notification.
  • Variants differ mainly in: screenshot tool (scrot, maim, grim+slurp, gnome-screenshot, spectacle, import, flameshot, mate-screenshot), clipboard tool (xsel, xclip, wl-copy), and language selection UIs (dmenu, fuzzel, wofi).
  • Some scripts emphasize robust error handling, cleanup via mktemp -d and trap, and good shell quoting practices.

OCR quality and Tesseract discussion

  • Mixed experiences: some find Tesseract “rather terrible” for sans‑serif UI fonts and historical scans; others say it has improved greatly over the last decade and works well for controlled scans.
  • Page segmentation mode is highlighted: default PSM 3 can be suboptimal; PSM 11 for disconnected text may help.
  • Alternative OCR stacks (EasyOCR, OCRmyPDF) are reported to outperform Tesseract in some scenarios.
  • There’s a perception that OCR “should be solved,” yet receipts and low‑res scans still cause frequent errors.

Platform-specific alternatives

  • Windows: PowerToys Text Extractor and the built‑in Snipping Tool OCR are common solutions.
  • macOS/iOS: Live Text in Preview, Quick Look, Safari, system‑wide photo text selection, and third‑party tools like macOCR, TRex, and Textinator.
  • Android: Google Lens, Photos, overview‑screen text selection, and “circle to search.”
  • Other desktop tools mentioned include NormCap and Frog.

Packaging, compatibility, and maintenance

  • Flatpak is seen as broadly available but not always preinstalled; some note potential GTK/desktop compatibility issues for unmaintained apps.
  • TextSnatcher’s repo appears inactive and its website certificate expired, raising concerns about long‑term support, though some argue old tools can still be useful.

Privacy and security considerations

  • One commenter suspected remote processing, but source inspection shows only local Tesseract use; no evidence of external services in the code.