Aug-17-2022, 12:43 PM
For my own use, I sometimes need to .split() input to get the top left and bottom right of a rectangle.
I keep doing this in a while loop, until I am happy with the result jpg.
I do:
50 300 1500 2000
I keep doing this in a while loop, until I am happy with the result jpg.
I do:
nums = input('Enter the coordinates you want, separated by a space ... ')Then I enter something like:
50 300 1500 2000
coords = nums.split()which gives me a list of 4 numbers [50, 300, 1500, 2000} I can pass to Image to crop the picture.