image extraction clean up