added image utilities for image rescalling