main/getteximage: Use the height argument to calculate memcpy copy size