You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been a regression in how certain small sized ellipses are filled sometime between 2.3.0 and 2.6.1 and it is still present in 2.8.1.
The result is that the entire area is not filled--the bottom "edge" of the shape has a "bite" out of it.
Here is a magnified view of a comparison between versions--note the bottom of the green ellipse fill is incomplete in more recent versions:
This was first noticed when some code that drew a small white on black ellipse was moved from Pillow 2.3.0 to Pillow 2.7.0, I then replicated the results as far back as 2.6.1 and as far forward as 2.8.1.
It does not happen at all sizes, e.g. when size in the test script is at (I think) 51 pixels the issue is not apparent.
The change in behaviour is very noticeable at small sizes on low resolution displays.
(It should be noted that the original fill implementation has a bug in it--the "fill" is drawn outside the "outline" in certain places--which is no longer present in the current implementation but IMO this was less of an issue than the missing fill.)
Here are the details of where the test cases were run:
$ uname -a
Linux vagrant-ubuntu-trusty-64 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ python --version
Python 2.7.6
The test script:
import Image, ImageDraw
size=50
for outline_colour in [ (0,0,255), None]:
i=Image.new("RGB",(size,size),(255,0,0))
id_=ImageDraw.Draw(i)
id_.ellipse(((0,0),(size-1,size)), outline=outline_colour, fill=(0,255,0))
i.save("ellipse-%s-%soutline.png" % (Image.PILLOW_VERSION,
("no-" if not outline_colour else "")))
Here are the individual files output by the test script:
The text was updated successfully, but these errors were encountered:
I've not checked in detail, but that sounds the likely cause. See also the related open issue #367 which still has things to be resolved, but it's not been touched in a while.
There has been a regression in how certain small sized ellipses are filled sometime between 2.3.0 and 2.6.1 and it is still present in 2.8.1.
The result is that the entire area is not filled--the bottom "edge" of the shape has a "bite" out of it.
Here is a magnified view of a comparison between versions--note the bottom of the green ellipse fill is incomplete in more recent versions:
This was first noticed when some code that drew a small white on black ellipse was moved from Pillow 2.3.0 to Pillow 2.7.0, I then replicated the results as far back as 2.6.1 and as far forward as 2.8.1.
It does not happen at all sizes, e.g. when
size
in the test script is at (I think) 51 pixels the issue is not apparent.The change in behaviour is very noticeable at small sizes on low resolution displays.
(It should be noted that the original fill implementation has a bug in it--the "fill" is drawn outside the "outline" in certain places--which is no longer present in the current implementation but IMO this was less of an issue than the missing fill.)
Here are the details of where the test cases were run:
The test script:
Here are the individual files output by the test script:
The text was updated successfully, but these errors were encountered: