imagepalettetotruecolor

PHP 5 >= 5.5.0, PHP 7, PHP 8
imagepalettetotruecolor - Converts a palette based image to true color
Manual
Code Examples

imagepalettetotruecolor( GdImage$image ): bool

Converts a palette based image, created by functions like imagecreate to a true color image, like imagecreatetruecolor.

Parameters

image

A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor.

Return Values

Returns true if the convertion was complete, or if the source image already is a true color image, otherwise false is returned.

Changelog

Version Description
8.0.0 image expects a GdImage instance now; previously, a resource was expected.

Related Functions

Example of imagepalettetotruecolor

Show all examples for imagepalettetotruecolor

PHP Version:


Function imagepalettetotruecolor:

Image Processing and GD Functions

Most used PHP functions