Replies: 1 comment 3 replies
-
I feel like this function would be an odd exception to the general co-ordinate system of Pillow. If it made it in, then why stop with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings! I'd find it very useful to have an Image method similar to
crop
but which takes fractions rather than pixel coordinates, so as to play more nicely (and predictably!) with images of varying sizes, but a known aspect ratio. The proposed method would just convert the fractions to pixels and then callcrop
under the hood.Would anyone else find this useful? Is this something the devs would be open to adding?
Example:
if
img.size == (1920, 1080)
thenimg.cropf((0.1, 0.65, 0.2, 0.75)) == img.crop((192, 702, 384, 810))
.(where
cropf
is the name of the new proposed method)Beta Was this translation helpful? Give feedback.
All reactions