Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #5375

After #5552, running the code from that issue, there is a unintended line on the right and bottom of the image.

test

draw.rectangle((0, 0, width, height), outline=color, width=border)

I would have just forgotten that

https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#PIL.ImageDraw.ImageDraw.rectangle

The second point is just outside the drawn rectangle.

Fixing that, I get

test

@radarhere radarhere changed the title Corrected border position in ImageOps.expand() Corrected border position for P mode in ImageOps.expand() Jun 29, 2021
@hugovk hugovk added the automerge Automatically merge PRs that are ready label Jun 29, 2021
@mergify mergify bot merged commit 49b6dc6 into python-pillow:master Jun 29, 2021
@radarhere radarhere deleted the expand branch June 29, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge PRs that are ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImageOps.expand distorts image and converts png to grayscale

2 participants