Finally got grayscale texture loading to work. After talking to Yousif, I realized that each image has a different color depth and I was previously calculating the total bytes assuming that they were all 32-bit.