Link compression level to image quality