Skip to content

Conversation

@radarhere
Copy link
Member

#7155 (comment)

In the docs, it says, for the Coordinate System:

For example, a rectangle covering all of an 800x600 pixel image is written as (0, 0, 800, 600).

Is this not incorrect, as since the images are zero-based, that text ((0, 0, 800, 600)) should actually be for an image 801 x 601? And so that line of text should really be:

For example, a rectangle covering all of an 800x600 pixel image is written as (0, 0, 799, 599).

My first attempt to address this was #7156, but while ImageDraw's rectangle() includes endpoints, it was pointed out that crop() does not.

In this PR, I simplify things by removing the description of how a rectangle will relate to an image.

@hugovk hugovk merged commit a6efb36 into python-pillow:main Jun 13, 2023
@radarhere radarhere deleted the coordinate branch June 13, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants