Re: [pygame] informal poll on Windows python version

2010-04-29 Thread Christoph Gohlke
Windows Version: Windows 7 Pro 64-bit Pygame Version: 1.9.2pre Python Version: 2.6.5 64-bit

Re: [pygame] informal poll on Windows python version

2010-04-29 Thread Chris Van Bael
Windows XP SP3 in VirtualBox on Windows 7 or Ubuntu (I'm very hesitant to build executables on Windows 7) Python 2.6 (just switched over from 2.4 without problems) Pygame 1.9.1

Re: [pygame] Move sprite and stop it.

2010-04-29 Thread Alkatron
B W wrote: There are no stupid questions. Unless you work at my company where they seem to abound. :) You need to control all the details of sprite position in a loop with increments and conditions. There's no move_to in Pygame, though many of us have coded our own move_to functions we might

[pygame] using pil to covert rgb into grayscale

2010-04-29 Thread stas zytkiewicz
Hello, I'm trying to convert a RGB image into a grayscaled image using PIL but pygame keeps throwing this error: ValueError: Buffer length does not equal format and resolution size Why this code doesn't work, I have no idea :-( ('surf' is a pygame.Surface) pilimg = Image.fromstring('RGBA',

Re: [pygame] informal poll on Windows python version

2010-04-29 Thread Devon Scott-Tunkin
windows 7 python 2.6 On Thu, Apr 29, 2010 at 2:46 AM, Chris Van Bael chris.van.b...@gmail.comwrote: Windows XP SP3 in VirtualBox on Windows 7 or Ubuntu (I'm very hesitant to build executables on Windows 7) Python 2.6 (just switched over from 2.4 without problems) Pygame 1.9.1

Re: [pygame] Move sprite and stop it.

2010-04-29 Thread B W
I think I understand your move_to problem now. I had to invent that wheel for myself a while ago and the math was not trivial for me. I had to get my son to teach me new tricks. :) Even though they may not be the most elegant math solutions, they are reliable. I uploaded this very basic demo:

Re: [pygame] using pil to covert rgb into grayscale

2010-04-29 Thread Jason M. Marshall
Stas,   This is simple and it works.   Jason def convert_to_gs(surf):     width, height = surf.get_size()     for x in range(width):     for y in range(height):     red, green, blue, alpha = surf.get_at((x, y))     average = (red + green + blue) // 3     gs_color =

Re: [pygame] using pil to covert rgb into grayscale

2010-04-29 Thread Casey Duncan
If you are going to roll your own, at least use the standard luminance calculation: L = 0.3 * red + 0.59 * green + 0.11 * blue hth, -Casey On Apr 29, 2010, at 9:22 AM, Jason M. Marshall wrote: Stas, This is simple and it works. Jason def convert_to_gs(surf): width, height =

Re: [pygame] using pil to covert rgb into grayscale

2010-04-29 Thread stas zytkiewicz
On Thu, Apr 29, 2010 at 5:36 PM, Casey Duncan ca...@pandora.com wrote: If you are going to roll your own, at least use the standard luminance calculation: L = 0.3 * red + 0.59 * green + 0.11 * blue hth, Thanks for the quick reply guys. I combined your answers and it works perfectly :-)