[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Filters



hi,

Definitely would be useful.

There are some filters in the SDL_gfx that might be useful.

There is a patch for adding that to pygame, and also Marcus wrapped it
in pgreloaded.


The filters are listed here: http://www.ferzkopp.net/joomla/content/view/19/14/
I'm pretty sure you could use one of those for what you want to do?

So perhaps we can include it in pygame 1.9?  That has long since been a plan.


cheers,

On Sun, Feb 15, 2009 at 8:27 AM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> Hi,
>
> I think it might be a good idea to include filters in PyGame.
>
> The laplacian "algorithm" is actually already a filter--the kernel is:
>  0, -1,  0
> -1,  4, -1
>  0, -1,  0
> or something similar--so I know SDL can certainly do filter operations.
> It would be nice to be able to specify custom filters like the box blur:
> (1/9) *
> 1, 1, 1
> 1, 1, 1
> 1, 1, 1
> or a gaussian blur:
> (1/273) *
>  1,  4,  7,  4,  1
>  4, 16, 26, 16,  4
>  7, 26, 41, 26,  7
>  4, 16, 26, 16,  4
>  1,  4,  7,  4,  1
> and so on.
> Thoughts on including something like this in PyGame?
>
> -Ian
>