I don't have DelphiX installed anymore; however, I think you are doing it wrong. The first parameter specifies a rect of 512x512. But what is the ClientRect doing there? That would give you the forms available size for controls. I am not sure if it is the first or the third parameter that carries the size of the original surface, but I think it should be a rect of 1024x1024..

Hope it helps