What are common issues with color distortion in PHP-generated thumbnails and how can they be resolved?

Common issues with color distortion in PHP-generated thumbnails can be caused by incorrect color profiles or compression settings. To resolve this, you can use the `imagecreatefromjpeg()` function to create a new image from the JPEG file and then use `imagejpeg()` to save the image with the correct color profile and compression settings.

// Create a new image from the JPEG file
$image = imagecreatefromjpeg('original.jpg');

// Save the image with correct color profile and compression settings
imagejpeg($image, 'output.jpg', 100);

// Free up memory
imagedestroy($image);