AirtestProject / Airtest

UI Automation Framework for Games and Apps
http://airtest.netease.com/
Apache License 2.0
8.19k stars 1.29k forks source link

def crop_image(img, rect): Remove one pixel #1250

Open ThierryOyhanto opened 2 weeks ago

ThierryOyhanto commented 2 weeks ago

When using crop_image, the returned image is one pixel smaller.

This is the line in aircv.py

x_max, y_max = min(width - 1, x_max), min(height - 1, y_max)
img_crop = img[y_min:y_max, x_min:x_max]

I don't understant why we remove one pixel Sorry for my english