ReadPixel and PNG issues

BlitzMax Forums/BlitzMax Beginners Area/ReadPixel and PNG issues

Ant(Posted 2005) [#1]
Hi, I've been looking at ReadPixel functions that can be found here:

http://www.blitzmax.com/Community/posts.php?topic=49893&hl=readpixel

I've found an odd problem though. The code works as it should with most images I load into it - it prints out the RGB value of each pixel and works great. However, if I load an image which is completely white with the first pixel (0,0) as black, it reports that its rgb value is 255,255,255 (white) instead of 0,0,0(black).

I've got a feeling this might be a compression issue - but I've set compression to 0. I'm using irfanview to save the png's BTW. Has anyone encountered this before?

Below is the code I am using. Thanks






tonyg(Posted 2005) [#2]
I created a PNG in GGales at 128*128 with first pixel black and it works OK.
I took that png into Irfanview and 'save as' with compression 0 and it still worked OK.


Ant(Posted 2005) [#3]
Confusing.....not sure what to do. I'll try a couple more images. Is GGales shareware?


Ant(Posted 2005) [#4]
Got it. I wasnt saving the transparent colour which was messing it up.
Thanks for the help.