0

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.

worisi24
  • 129
  • 3
  • 11

1 Answers1

0

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'));
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432