readpixel reads the Alpha Channel ?

BlitzPlus Forums/BlitzPlus Programming/readpixel reads the Alpha Channel ?

Red(Posted 2003) [#1]
...


Snarty(Posted 2003) [#2]
No, only on a texture as far as I know. If the image in memory is 32Bit, then yeah, it could read the alpha data.

Best way is to use an alpha map the same you would a pixel map with palettised images. The Userlib I'm working on will allow the loading of Alpha maps from PNG files. This will be stored as a bank.


Parlance(Posted 2003) [#3]
Images in BlitzPlus are always stored in 32-bit color regardless of the current pixel format. And yes, readpixel does read the alpha channel in the form of ARGB and it always reads as $FF.


Beaker(Posted 2003) [#4]
Chris - that isn't true. Images in BlitzPlus are not always 32-bit.


Snarty(Posted 2003) [#5]
They are stored as 24bit RAW bitmaps, and the only way you can force this is use them with Flag 4. ReadPixel does all the pixel conversion for you, and is thus slightly slower than peeking the RAW data directly, providing your own conversion is outside the loop.