I've tried to convert that example source to delphi and I cannot get the .data attribute of a PTAUX_RGBImageRec to give me any info... It is a pointer, but to what? That is an eternal mystery
Second problem there is that there isn't a RGBA brother of PTAUX_RGBImageRec.

Tried to get a TBitmap to link to PTAUX_RGBImageRec too, but with no succes. Too bad...

But I've got a demo with masking working, so that's good news