Project: datamanagement
Issue DM-2633: refactor the image stretch code for better, simplified  organization 
Story points: 8