move getPixelBytes to the right place