Reply to Re: How can I get GIF histogram data using PHP?

Your name:

Reply:


Posted by Oli Filth on 01/09/06 23:00

firewoodtim said the following on 09/01/2006 19:08:
> On Mon, 09 Jan 2006 01:39:26 GMT, Oli Filth <catch@olifilth.co.uk>
> wrote:
>
>>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.
>
> I did what you suggested, and it worked as predicted, but that still
> leaves me with just the palette index for each color. i still need to
> correlate that with the palette itself, in order to get the actual
> color value. Can you advise me on how to get a GIF's palatte?

Dude, did you take any time *at all* to have a look at the PHP manual
for the GD functions? If you'd looked at the manual page for
imagecolorat(), for instance, you would've seen some "See also" links,
some of which you might have found useful...

--
Oli

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация