I'm trying to work out how the pixels are stored in the returned array but I'm not having a lot of luck (and thus my calculations don't seem to be working).
I realize that the pixels are stored in one long continuous array but are the pixels grabbed width first or height first? I've tried drawing out the "pixels" of a texture on paper to calculate where the pixels should be based on the single array but I'm not getting expected results.
My assumption is the following:
Assuming I am using
i to specify rows and
j to specify columns that any given pixel in a 2D texture can be calculated by the sum of
i * j or is this incorrect?