The imagecolormatch() function is an inbuilt function in PHP which is used to make the color of palette version of an image more closely match the true color version. This function returns true on success or false on failure.
bool imagecolormatch ( $image1, $image2 )
Parameters: This function accepts two parameters as mentioned above and described below:
- $image1: It is returned by one of the image creation functions, such as imagecreatetruecolor(). It is used to create size of image.
- $image2: It is the palette image links the resource pointing to an image of the same size as image1.
Return Value: This function returns True on success or False on failure.
Below programs illustrate the imagecolormatch() function in PHP:
- How to get the function name inside a function in PHP ?
- PHP | cos( ) Function
- p5.js | str() function
- p5.js | min() function
- p5.js | red() function
- PHP | sin( ) Function
- PHP | end() Function
- PHP | pos() Function
- p5.js | hue() function
- p5.js | hex() function
- CSS | hsl() Function
- p5.js | second() function
- D3.js | d3.set.add() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.