A
A
Alikhan2021-10-23 11:19:38
Python
Alikhan, 2021-10-23 11:19:38

How to crop the top of an image in Python?

How to crop the top of an image and save it in Python?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wispik, 2021-10-23
Mulaev @AlikhanPython

pillow crop

P
petrushik, 2021-10-23
@petrushik

There was a task to recognize part of the text from the screen, for this I cropped the screenshot using pyautogui. It's as simple as possible, but I don't know if it will suit your task or not.
import pyautogui as root
image = root.screenshot(region=(664, 276, 665, 60))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question