Unless you post an attempt, we can't begin to figure out exactly what you're looking at.

To me it just seems a simple case of stepping through the array 3 bytes at a time for 80,000 pixels.
Every 320 pixels, you start a new row of pixels.