Forum Discussion
OregonPine
Sep 04, 2025Iron Contributor
How do I convert a picture to text from Windows 11?
Hi everyone, I have several screenshots from scanned documents and I'd like to extract the text so I can edit or copy it. I've heard this is possible with OCR (Optical Character Recognition), but no...
Taprint
Sep 04, 2025Iron Contributor
Python script. Pytesseract is a Python wrapper for Google’s Tesseract OCR Engine, an open-source optical character recognition tool that can extract text from images. It allows developers to easily integrate OCR functionality into Python scripts, enabling them to detect and read text from images (like screenshots, scanned documents, or photos) with just a few lines of code.
By using pytesseractalong with the Python Imaging Library (PILor Pillow), you can process image files and convert the contained text into editable, searchable, or analyzable strings.
Example code for converting pic to text on Windows PC or Mac:
from PIL import Image
import pytesseract
text = pytesseract.image_to_string(Image.open('your_picture.png'))
print(text)