Posted by Oli Filth on 01/09/06 03:39
firewoodtim said the following on 08/01/2006 18:53:
> I want to analyze a GIF file and retrieve the histogram data on the
> image (pixel quantity and color symbol for each color in the file.)
> Does anyone know how to use PHP to do this?
Load the image with imagecreatefromgif(). Then loop through each pixel
of the image, call imagecolorat() to obtain the palette index for that
pixel, and increment a tally for each palette index.
These functions are described in the PHP manual.
--
Oli
Navigation:
[Reply to this message]
|