Re: Bug: ImageFilter.py GaussianBlur radius not set

Fredrik Lundh <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
On Thu, Oct 7, 2010 at 8:08 PM, Even <[email protected]> wrote:
> The constructor for GaussianBlur class accepts the argument radius, with
> default value 2,
> but it does nothing with this argument, and instead hardcodes the radius to
> 2.
> Below is the code found in PIL 1.1.7:
> class GaussianBlur(Filter):
>     name = "GaussianBlur"
>     def __init__(self, radius=2):
>         self.radius = 2
>     def filter(self, image):
>         return image.gaussian_blur(self.radius)
>
>
> I believe it should be "self.radius = radius" instead.

Indeed.  Trivial patch here:

http://hg.effbot.org/pil-2009-raclette/changeset/ee5c367a6a75
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.