Close image file before writing