Define 'self' in 'writeImage_'