I'm trying to write some code which loads a pixmap (from a PNG file), loops through the pixels, and replaces all the pixels of a particular color with a different color.
The problem, unfortunately, is occurring even before I get to the part where I change the pixel color. At every step of my loop, the pixel color being returned by ReadPixel is black (RGB #000000), even though there are pixels with other colors in them (the pixel at 181,21 is actually red, for instance).
Any idea why I'd see this kind of behavior? I've included the relevant code (and the image) below.
Thanks,
Corporate Dog
The problem, unfortunately, is occurring even before I get to the part where I change the pixel color. At every step of my loop, the pixel color being returned by ReadPixel is black (RGB #000000), even though there are pixels with other colors in them (the pixel at 181,21 is actually red, for instance).
Any idea why I'd see this kind of behavior? I've included the relevant code (and the image) below.
Thanks,
Corporate Dog
Graphics 640, 480, 32 Global myPixmap:TPixmap = LoadPixmapPNG("C:\testFireBrand.png") For y = 0 To 367 For x = 0 To 363 p = ReadPixel (myPixmap, x, y) If (x = 181 And y = 21) Then Notify p ... Next Next