doMosaicMagic method