Those calls are in the wrong order. You need to call glPixelStore() before uploading the texture data. Pixel storage modes affect the process of reading and writing rectangular blocks of pixels to or...