REFACTORED targa image static load and save functions