imagecolorstotal

PHP 4, PHP 5, PHP 7, PHP 8
imagecolorstotal - Find out the number of colors in an image's palette
Manual
Code Examples

Example #1 Getting total number of colors in an image using imagecolorstotal

Result: Total colors in image: 128
PHP Version:


Function imagecolorstotal:

Image Processing and GD Functions

Most used PHP functions