Make 3-d texture generation more efficient

Prefer memcpy over looping in the case chan=1,bpc=1