Catch errors from Targa images (just in case), remove unused parameters