Added blur and writeImage functions