Removed unnecessary loop from imageGetNumPixels().