imagecolormatch

Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Makes the colors of the palette version of an image more closely match the true color version
<?php imagecolormatch(GdImage $image1, GdImage $image2): bool