How to disable sub-sampling when saving jpg image using PHP GD library?
问题 I noticed that each time I save a jpg file in PHP, it is saved with sub-sampling. How to remove that? I'm using GD library. 回答1: I believe newer versions of libgd disable chroma-subsampling if you set the quality to 90 or higher. Failing that, you could consider using PHP Imagick and disabling chroma sub-sampling with: $img->setSamplingFactors(array('1x1', '1x1', '1x1')); 来源: https://stackoverflow.com/questions/57350007/how-to-disable-sub-sampling-when-saving-jpg-image-using-php-gd-library