Changing all pixel indexes to uint16_t.