nanshe/advanced_image_processing.py: Added condition for copying on borders.