advanced_image_processing: Made sure individual functions due not change arguments, but do return changed results.