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

Re: [pygame] Crop Image with Numeric



Rikard Bosnjakovic wrote:
On 7/5/06, Kamilche <klachemin@xxxxxxxxxxx> wrote:
if alpha[x][y] > 0:

Strip ">0" from that line. That is, change it to "if alpha[x][y]:".



Uh, that made it work a lot faster, but I don't know why. :-D It could still use some speed improvement, but at this point I'd call it usable. I thought it would require some mumbo jumbo with slicing columns out and doing nonzero checks, but this works too. Thanks!


-Kamilche