Extracting Ns._process_image_params() and creating unit test