Actually I realised in the shower this morning that if the readpixel returns $0000FFFF then of course the last 2 bytes will equal the mask. So, erm, ignore the post above :-)
The problem (black pixels returning $0000FFFF) still remains though.
The problem (black pixels returning $0000FFFF) still remains though.