Page 1 of 1

imagecolorat() help

Posted: Mon May 20, 2002 5:11 pm
by Pintonite
I'm having difficulty using this function. Perhaps I am doing something wrong. At the moment I am trying to use it to help me differentiate from thousands of images so i can view only those that I want and ignore the others. Is this function only useable when creating virtual images or can it be used for images that have already been created?

Thanks

Re: imagecolorat() help

Posted: Thu May 23, 2002 4:45 pm
by duke9
Pintonite wrote: Is this function only useable when creating virtual images or can it be used for images that have already been created?
Thanks
It can be used on existing files, the code would be something like that

Code: Select all

$img = imagecreatefrompng ("photo1.png");
$color = imagecolorat($img,10,30);
There are other functions for other image formats, take a look at
http://www.php.net/manual/en/ref.image.php

Posted: Thu May 23, 2002 5:49 pm
by Pintonite
thanks for the submit