Store pixels in uint32_t instead of long

Saves space and works on 32-bit systems