Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved coordinate system documentation #7156

Closed
wants to merge 1 commit into from

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).

I've changed the third and fourth items in the tuple to be one less, but I've also changed it to a (2, 2) image instead of (800, 600). I think that's easier to understand.

@Yay295
Copy link
Contributor

Yay295 commented May 11, 2023

Is the upper bound exclusive? (0, 0, 800, 600) would be correct in that case.

@nulano
Copy link
Contributor

nulano commented May 11, 2023

I think it depends on the function. #1668/related issues mentioned that both endpoints are included for most ImageDraw functions, but e.g. crop does not seem to include the bottom-right coordinates.

@radarhere
Copy link
Member Author

Good point @nulano

@radarhere
Copy link
Member Author

I'm trying again with #7169, this time by just removing the description of how a rectangle relates to an image.

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.

None yet

3 participants