First of all, I am sorry for not being able to provide a source code for the test program.
This program is available at : http://frictionalgames.com/forum/thread-3656-post-30293.html#pid30293
It appears that some textures coordinates are misread, which leads to some upside down rendering.
I am attaching the output of the program. You can find how the images should look in the image "feat_test_images_round2.jpg".
here is the output with the image to compare with :
Duplicate of bug 29420?
*** This bug has been marked as a duplicate of bug 29420 ***