[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pixel alpha blends tutorial
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Pixel alpha blends tutorial
- From: James Hofmann <jwhinfinity@xxxxxxxxx>
- Date: Sun, 26 Mar 2006 12:28:51 -0800 (PST)
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sun, 26 Mar 2006 15:28:59 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DhWeP9qjKAEuXWKI1V7+bdZscSXcLcg5g6R1KcsEqts1ImHrUFqVoIobTTQufwlLzJ4SPOjuGtBTh0UW7xCbiQ3Ih61hT+XoyUsVJ/NARqc42kyy4UyaQH1CbG2PQA+2bpD1IX1c8sjEs0KwZ8iZocUKZy2Xapbw0U1cteSrbjU= ;
- In-reply-to: <10161458813.20060326090718@columbus.rr.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
--- "R. Alan Monroe" <amonroe@xxxxxxxxxxxxxxx> wrote:
>
> > newalpha = pygame.surfarray.pixels_alpha(newcol) #
> > pixels_alpha gives us a ref
> > for n in range(len(newalpha)):
> > newalpha[n] = alphaarray[n] # and so we simply
> > replace each referenced pixel
> > del newalpha # and then clean up (this unlocks the
> > surface)
>
>
> Traceback (most recent call last):
> File "C:\coding\alphasprite\alphatests.py", line
> 47, in ?
> newalpha[n] = alphaarray[n] # and so we simply
> replace each referenced pixel
>
> ValueError: matrices are not aligned for copy
>
>
> Alan
>
>
Your surface sizes are mismatched.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com