Function __global->imagetruecolortopalette

Definitions

sources_custom/phpstub.php

  • Convert a truecolor image to a palette image.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$image resource No No required parameter N/A N/A The image involved
$dither boolean No No required parameter N/A N/A Whether to use dithering
$ncolors integer No No required parameter N/A N/A The maximum number of colors that should be retained in the palette

Preview

Code (PHP)

/**
 * Convert a truecolor image to a palette image.
 *
 * @param  resource $image The image involved
 * @param  boolean $dither Whether to use dithering
 * @param  integer $ncolors The maximum number of colors that should be retained in the palette
 */

function imagetruecolortopalette($image, bool $dither, int $ncolors)