Targa input fix: more robust check for presence of alpha.
The previous check could fail for certain alpha flag, incorrectly thinking
it was a 2-channel image instead of 1, or 4 channel instead of 3.
Targa bug fix -- reversed R and B channels for certain palette images.