compressing main image