Search code examples
phpgd

How to remove ImageFilledPolygon php jagged edges?


I have a function that fills a part of the bitmap created by imagecreatetruecolor($h,$w) ; But the result is the drawing looking jagged and not smooth which sucks. I tried the php antialias(resource,boolean) function and there is no difference. I can only guess it isn't supported. Any gurus know of any neat trick to make the edges smooth? If you look at the image http://www.php.net/manual/en/images/21009b70229598c6a80eef8b45bf282b-imagefilledpolygon.png from the php manual, that is exactly what I mean. Any ideas how to remove it (the jagged edges)? Thanks a lot in advanced.


Solution

  • To make the edges smooth, you can try the resizeimage function and add a blur parameter.