tga: Split out a function
tga: Split out a function

Simplifies code and thereby makes it clearer which formats are
supported.

GNOME/gdk-pixbuf,Distrotech/gdk-pixbuf,Distrotech/gdk-pixbuf,Distrotech/gdk-pixbuf,GNOME/gdk-pixbuf,GNOME/gdk-pixbuf,Distrotech/gdk-pixbuf,Distrotech/gdk-pixbuf,GNOME/gdk-pixbuf