Added the pixel-based code in testing.