process img file