Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
[deleted comment]
after isolating the problem exposed on previous post,
I've tried to make some debug on code...(remember that I'm not native python
dev)
after some hours on try to understand the real problem, I've found that the
code :
conf, pixel = self.opacity, self.color_scheme.alpha_map[key]
is the real problem... the instruction
self.color_scheme.alpha_map[key]
SEEMS return an array instead a int if i make a cast on this with
conf, pixel = self.opacity, int(self.color_scheme.alpha_map[key])
the map as been created but the opacity is wrong (is really dark).
So, after some other check i've see that the code:
pygame.surfarray.pixels_alpha(colors)[0]
return every time an array of 255 element with 255 as value for all elements as
i can
understand, seem that the opacity is set every time to the most dark value.
i hope this can help on debug the problem and on finding a solution
TIA
Original comment by marco.de...@gmail.com
on 5 May 2008 at 4:29
Hrm ... try the nightly build of PyGame:
http://thorbrian.com/pygame/builds.php
Actually, you've reminded me that there is another problem in 1.8.0 (saving to
PNG is
broken!) that means you need a dev version of PyGame. I will add a note to the
homepage about that.
Original comment by whit537@gmail.com
on 5 May 2008 at 5:35
thank you for your reply, i thought that the problem can be the library because
I've
checked the image created by gheat with a binary editor (because irfanview say
that
the file are not a png but a jpg) and i found a jpg file instead a png file!
(with
png extension) i think that, as you say, the problem is the library that create
a jpg
instead a png file.
Another information that you can add on installation documents is that (almost
under
winxp) you need to install numpy or you receive an obscure exception like this :
raise ImportError("Neither Pygame nor PIL could be imported.")
ImportError: Neither Pygame nor PIL could be imported. [apps.conf, line 1]
this seems a problem with pygame or PIL but is a missing numpy library error.. i
spent 1 hour to understand this :)
P.s. many many thanks for this great pieces of software, is really useful for
me and
with this tool I've the opportunity to try a great language like python
Original comment by marco.de...@gmail.com
on 5 May 2008 at 6:24
Thanks for your persistence and feedback. I've added notes to the project page
regarding Pygame installation gotchas.
Original comment by whit537@gmail.com
on 5 May 2008 at 7:06
Original comment by whit537@gmail.com
on 31 May 2008 at 1:55
Original issue reported on code.google.com by
marco.de...@gmail.com
on 5 May 2008 at 12:04