Added function processImage