Image operation refactored.