refine image file