tga loader minor optimization