change outpout size based on quality