fixing call to readPixels (untested, but compiles)