Fix creating textures from image data with flipping

When the image data is copied into a texture with flipping set to true
each row has to be copied into the (height - row - 1)th row instead of
the row with the same number. Otherwise it will just create an unflipped
copy.
Merge pull request #299 from reboot/fix_creating_flipped_textures

Fix creating textures from image data with flipping