Finished painting function, implemented image sharpening