[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Filters
- To: "pygame-users@xxxxxxxx" <pygame-users@xxxxxxxx>
- Subject: [pygame] Filters
- From: Ian Mallett <geometrian@xxxxxxxxx>
- Date: Sat, 14 Feb 2009 13:27:56 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 14 Feb 2009 16:27:59 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=1Ql2Ima6uhDloey4Uo+rsCj+drMuxdSBFBnnwy+IQ/c=; b=IYqMJr3c8qD3uBtyll202BekalqBF9SUk6QaF7401F45jeCryr7dGVIibmoDIMbNnL y5DGGmm+BOJVJ8A10ztqMFt1QMfd8gS2PqQ+qohAjsjDXEkQ+A/cJr5C3puHQ9LPg5RW zbguLLUqBKXW+AAjNgPIoPgUv81RPDmSsx5vA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=voRb152VjK0JSfTxAXkoSrol+Zp9pa9VJJ4b6ojK5dRc3IyUzrKFJ7uu9ld4aBeU7n 0wzJWJ4/w0cCzWR8n/lBd0Lnd9BKxljtVpvKV3wVBMWBASW+BDyg8160ANXGv0l32EH8 1QjQEYDvCSZRNDmLMka2bE4l6HJhoIczgelQc=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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