Revise tga encoding