|
imagecolorclosestalphaGet the index of the closest color to the specified color + alpha Beschreibung
int imagecolorclosestalpha
( resource
$image
, int $red
, int $green
, int $blue
, int $alpha
)
Returns the index of the color in the palette of the image which
is "closest" to the specified RGB value and
Parameter-Liste
RückgabewerteReturns the index of the closest color in the palette. Beispiele
Beispiel #1 Search for a set of colors in an image
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: #0: Search (254, 145, 154, 50); Closest match: (252, 150, 148, 0). #1: Search (153, 145, 188, 127); Closest match: (148, 150, 196, 0). #2: Search (153, 90, 145, 0); Closest match: (148, 90, 156, 0). #3: Search (255, 137, 92, 84); Closest match: (252, 150, 92, 0). Siehe auch
|