[racket] All black images...Ahhh

From: John Clements (clements at brinckerhoff.org)
Date: Tue Jul 20 19:49:38 EDT 2010

On Jul 20, 2010, at 5:32 PM, Mathew Kurian wrote:

> I just recently started coding a game in scheme and am noticing an issue when loading PNGs.
> This issue happens RANDOMLY on RANDOM image(s). So, its not just one particular image.
> well, i forgot to say the issue...the issue is that the images are full black. The image shape is evident and clear, but is filled with all black.
> I capped the memory at 512 MB.
> (define OVERLAY-RED (bitmap "src/bg-overlay/red.png")) ;; ex. of how i load the images
> Any ideas?
> Lemme show you the issue:
> Picture 1: Notice the RED blood: THIS IS THE GOOD ONE
> http://img829.imageshack.us/img829/4864/65490383.jpg
> Picture 2: Notice the now BLACK blood: I have tried to point it out using arrows: THIS IS THE ERRORED ONE
> http://img130.imageshack.us/img130/7563/76349361.jpg

First: I'm certainly impressed by the detail of your graphics. 

Second: It looks to me like this is an alpha channel issue; specifically, it looks like the transparency is being handled correctly, but that the pixel color info is lost.

Can you reduce this problem to a five-line program that fails some or all of the time?

John Clements

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20100720/8868729d/attachment.p7s>

Posted on the users mailing list.