Unix and Linux Discussions Tagged with image |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
2 |
2,513 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
10,888 |
What is on Your Mind? |
|
|
|
3 |
5,530 |
Web Development |
|
|
|
2 |
1,487 |
Programming |
|
|
|
4 |
2,235 |
Solaris |
|
|
|
3 |
5,023 |
Solaris |
|
|
|
0 |
9,036 |
FAQ Submission Queue |
|
|
|
3 |
1,623 |
Shell Programming and Scripting |
|
|
|
4 |
8,434 |
Programming |
|
|
|
5 |
4,121 |
Programming |
|
|
|
8 |
16,086 |
Shell Programming and Scripting |
|
|
|
3 |
2,308 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
7,891 |
Shell Programming and Scripting |
|
|
|
3 |
5,657 |
UNIX for Advanced & Expert Users |
|
|
|
5 |
3,875 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
805 |
Software Releases - RSS News |
|
|
|
0 |
653 |
Software Releases - RSS News |
|
|
|
0 |
1,081 |
Software Releases - RSS News |
|
|
|
0 |
1,804 |
Software Releases - RSS News |
|
|
|
0 |
1,061 |
Software Releases - RSS News |
|
|
|
0 |
1,409 |
UNIX and Linux RSS News |
|
|
|
1 |
2,335 |
Shell Programming and Scripting |
|
|
|
0 |
758 |
Software Releases - RSS News |
|
|
|
0 |
819 |
Software Releases - RSS News |
|
|
|
3 |
6,145 |
AIX |
|
|
|
0 |
1,979 |
UNIX and Linux RSS News |
|
|
|
0 |
877 |
Software Releases - RSS News |
|
|
|
0 |
648 |
Software Releases - RSS News |
|
|
|
0 |
668 |
Software Releases - RSS News |
|
|
|
0 |
1,064 |
Software Releases - RSS News |
|
|
|
0 |
772 |
Software Releases - RSS News |
|
|
|
2 |
3,745 |
Linux |
|
|
|
0 |
1,956 |
UNIX and Linux RSS News |
|
|
|
0 |
1,063 |
Software Releases - RSS News |
|
|
|
0 |
786 |
Software Releases - RSS News |
|
|
|
0 |
868 |
Software Releases - RSS News |
|
|
|
0 |
720 |
Software Releases - RSS News |
|
|
|
0 |
1,301 |
UNIX and Linux RSS News |
|
|
|
0 |
617 |
Software Releases - RSS News |
|
|
|
0 |
1,166 |
Software Releases - RSS News |
IMAGECOLORSTOTAL(3) 1 IMAGECOLORSTOTAL(3)
imagecolorstotal - Find out the number of colors in an image's palette
SYNOPSIS
int imagecolorstotal (resource $image)
DESCRIPTION
Returns the number of colors in an image palette.
PARAMETERS
o $image
- An image resource, returned by one of the image creation functions, such as imagecreatefromgif(3).
RETURN VALUES
Returns the number of colors in the specified image's palette or 0 for truecolor images.
EXAMPLES
Example #1
Getting total number of colors in an image using imagecolorstotal(3)
<?php
// Create image instance
$im = imagecreatefromgif('php.gif');
echo 'Total colors in image: ' . imagecolorstotal($im);
// Free image
imagedestroy($im);
?>
The above example will output something similar to:
Total colors in image: 128
SEE ALSO
imagecolorat(3), imagecolorsforindex(3), imageistruecolor(3).
PHP Documentation Group IMAGECOLORSTOTAL(3)