imagetruecolortopalette

Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Convert a true color image to a palette image
<?php imagetruecolortopalette(GdImage $image, bool $dither, int $num_colors): bool
<?php         if (is_numeric($count) && $count <= 256) {


            imagetruecolortopalette($resource, true, $count);

        }