Mister Hat Posted January 30, 2012 Share Posted January 30, 2012 I'm wondering how I can find the x, y coordinates on an image in PHP where a specific colour lies. If there was a #000000 coloured pixel located on 127, 205, how could I use PHP to find the 127, 205 by just telling it #000000? Quote Link to comment Share on other sites More sharing options...
ocpaul20 Posted January 30, 2012 Share Posted January 30, 2012 Dont know any other way but to start at the top and look at each pixel. There are various GD functions which may help you, depending on what you ultimately want to do. It is the same as any string search or byte search as the image is only a chunk of memory and the bytes are interpreted as colours. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.