added method insertOverlayWithPixelDiff