← All docs

imagetruecolortopalette()

Converts a truecolor image to a palette image in place.

imagetruecolortopalette()

function imagetruecolortopalette(mixed $image, bool $dither, int $num_colors): bool

Converts a truecolor image to a palette image in place.

Parameters:

  • $image (mixed)
  • $dither (bool)
  • $num_colors (int)

Returns: bool

Availability

Compiled (AOT)Magician (eval)
AvailableNot available yet

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how imagetruecolortopalette is implemented in the compiler, see the internals page.