1--TEST--
2Test imagecolorstotal() function : basic functionality
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if(!function_exists('imagecolorstotal') || !function_exists('imagecreatefromgif')) {
8    die('skip imagecolorstotal and imagecreatefromgif functions not available in this build');
9}
10?>
11--FILE--
12<?php
13echo "*** Testing imagecolorstotal() : basic functionality ***\n";
14
15// Get an image
16$gif = __DIR__."/php.gif";
17$im = imagecreatefromgif($gif);
18
19echo 'Total colors in image: ' . imagecolorstotal($im);
20
21// Free image
22imagedestroy($im);
23?>
24--EXPECT--
25*** Testing imagecolorstotal() : basic functionality ***
26Total colors in image: 128
27