Minor improvements to PixelUtil