write image