match source image structure