Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imagecolorresolve(3) [php man page]

IMAGECOLORRESOLVE(3)							 1						      IMAGECOLORRESOLVE(3)

imagecolorresolve - Get the index of the specified color or its closest possible alternative

SYNOPSIS
int imagecolorresolve (resource $image, int $red, int $green, int $blue) DESCRIPTION
This function is guaranteed to return a color index for a requested color, either the exact color or the closest possible alternative. If you created the image from a file, only colors used in the image are resolved. Colors present only in the palette are not resolved. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $red -Value of red component. o $green -Value of green component. o $blue -Value of blue component. RETURN VALUES
Returns a color index. EXAMPLES
Example #1 Using imagecoloresolve(3) to get colors from an image <?php // Load an image $im = imagecreatefromgif('phplogo.gif'); // Get closest colors from the image $colors = array(); $colors[] = imagecolorresolve($im, 255, 255, 255); $colors[] = imagecolorresolve($im, 0, 0, 200); // Output print_r($colors); imagedestroy($im); ?> The above example will output something similar to: Array ( [0] => 89 [1] => 85 ) SEE ALSO
imagecolorclosest(3). PHP Documentation Group IMAGECOLORRESOLVE(3)

Check Out this Related Man Page

IMAGECOLORCLOSESTHWB(3) 						 1						   IMAGECOLORCLOSESTHWB(3)

imagecolorclosesthwb - Get the index of the color which has the hue, white and blackness

SYNOPSIS
int imagecolorclosesthwb (resource $image, int $red, int $green, int $blue) DESCRIPTION
Get the index of the color which has the hue, white and blackness nearest the given color. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $red -Value of red component. o $green -Value of green component. o $blue -Value of blue component. RETURN VALUES
Returns an integer with the index of the color which has the hue, white and blackness nearest the given color. EXAMPLES
Example #1 Example of using imagecolorclosesthwb(3) <?php $im = imagecreatefromgif('php.gif'); echo 'HWB: ' . imagecolorclosesthwb($im, 116, 115, 152); imagedestroy($im); ?> The above example will output something similar to: HWB: 33 CHANGELOG
+--------+--------------------------------------------+ |Version | | | | | | | Description | | | | +--------+--------------------------------------------+ | 5.3.0 | | | | | | | This function is now available on Windows | | | | +--------+--------------------------------------------+ SEE ALSO
imagecolorclosest(3). PHP Documentation Group IMAGECOLORCLOSESTHWB(3)
Man Page

11 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

colors

(0 Replies)
Discussion started by: Sage3k
0 Replies

2. UNIX for Dummies Questions & Answers

Colors in Red Hat

I want to turn off all colors schemes when I log onto my RedHat system. I have copied the dir_colors file to my home directory and modified that to turn colors off but it doesnt appear to be working.(sourced the file from within my .profile). Also, I do not want the colors in my vi sessions... (2 Replies)
Discussion started by: google
2 Replies

3. UNIX for Dummies Questions & Answers

Colors in Ksh Script

Hi All, is it poosible to Print the error messages in colors.., i am using KSH..., i have tried the following, echo "\033 Hi This is Sam!!! But, when i tried to redirect in to a log file, i am getting as follows, echo "\033 1 line, 31 characters ^[[34m Hi This is Sikki!!! ^[[0m ... (0 Replies)
Discussion started by: Serious Sam
0 Replies

4. Shell Programming and Scripting

TTY colors are screwing up my output

I have been trying to get the output of an ssh session pushed to file... the problem is that there are colors in the output, and when I view the file the colors show up as "^[00m" or other such various nonsense The weird part is that if I do this all manually, I have no problems, but if I try to... (0 Replies)
Discussion started by: jjinno
0 Replies

5. Shell Programming and Scripting

New to KSH Scripting > Please Assist!

Array Example: $ colors=RED $ colors=GREEN $ colors=BLUE (4 Replies)
Discussion started by: ora_umair
4 Replies

6. Linux

error while retrieving image using system imager

This is the error that I am getting while retrieving image from image server using system imager.... Listening on LPF/lo/<null> sending on Socket/fallback/fallback-net DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 5 DHCPDISCOVER on lo to 255.255.255.255 port 67 interval5... (1 Reply)
Discussion started by: nitesh_tarbani
1 Replies

7. Red Hat

where can find the good image file of red hat

I have failed many times on install red hat in virtual machine, can anybody provide the good image file of red hat? (3 Replies)
Discussion started by: wulaishiwo
3 Replies

8. UNIX and Linux Applications

GnuPlot - 2d-graph --> depending from size, different color

Hi, i would like to change color depending from the valuerange. a gnuplot-script will generate a multiplot and in one graph, the ranges should have different colors, e.g. 100 ... 133 --> red 200 ... 233 --> blue 300 ... 333 --> orange 400 ... 433 --> green #Partikeldata - Partikel... (1 Reply)
Discussion started by: IMPe
1 Replies

9. UNIX for Dummies Questions & Answers

Colors not being Interpreted

Hello, I am having an issue with ANSI colors in Redhat linux. I am running a script where the colours have been set very early on as follows: # Reset Color_Off='\033 Later in the script these are used to color define sections of output by reffering to them using: ${White} blah blah blah... (4 Replies)
Discussion started by: Pedro72
4 Replies

10. SCO

I'm looking for UNIXware 7.xx, or the closest version to that

Im looking for Sco UnixWare 7.xx or the closest version to download it please pm me if you want the privacy (9 Replies)
Discussion started by: BaxxterHp
9 Replies

11. Shell Programming and Scripting

Embedding JPEG image to the body file

hi, I am trying to embed an image to the body of the email, but the image is not visible. echo "<html> <body> <style> body {background-color:blue} </style> <h1>hello</h1> <center> <img... (1 Reply)
Discussion started by: ATWC
1 Replies