im looking for a php function that will return the RGB value of a specific pixel in a image.
i have looked arround but so far have only been able to return its position in the color index.
any ideas?
look for gd functions
Already did.
i have done a more than modest amount of image modification with PHP, so im not exactly new to the idea of GD useage, but untill now the need for color detection wasn't exactly paramount.
i have looked everywhere, and cant seem to find anything, so at this point im looking for anyideas, workarounds, anything that will return the RGB values of an image at a specific pixel.
you have not been doing your homework, written with help of the manual:
$filename="gfx/thunder22.JPG";
$resource=imagecreatefromjpeg($filename);
$color=imagecolorat($resource,$w,$h);
$colorarray=imagecolorsforindex($resource,$color);
thanks a million,
i dont know how i missed that one, but i assure you i did check the manual (several times with much frustration) but somehow missed that function...
ah well, it works great, so thanks again