How To Find Image Colours
Computing : Learning PHP If you want to find the colours of particular pixels in an image, then you can do so easily with PHP and the GD graphics library. This will have many applications - for instance if you want to stick a pin in a map dynamically and want it to blend in with the background then you can set the transparency using the method by finding the background colour. All you need to do is use the imagecolorat() function, and pass to it the image identifier, pixel-x and pixel-y co-ordinates. It then returns the RGB values for the pixel that you specify. This is a handy technique and has many applications in a surprisingly wide range of uses.
Questions about PHP:
|
|