Reply to Re: Image colours

Your name:

Reply:


Posted by Jeff Paffett on 11/21/76 11:32

Reading up on this, I'm probably going to reduce the image size before
running the process, as this will simplify the colour range anyway,
which is probably a good thing for the application I want.

I agree with Geoff that processing time will not be too bad,
particularly if I do the indexing at upload time, then store it in the
database. I was playing with a script yesterday that created the three
RGB histograms and that was working fairly fast on 2.5 meg images.

Jeff

Oli Filth wrote:
>
> Geoff Berrow wrote:
>
>>Message-ID: <1131536758.437017@athnrd02> from Jeff Paffett contained the
>>following:
>>
>>
>>>I maybe didn't express myself too well. I want to extract the color
>>>information from the image file, using PHP/GD.
>>
>>I think you'd have to decide what you were looking for. Say you divided
>>the spectrum into black, white, red, green, blue, cyan, magenta, and
>>yellow.
>>It would be possible to look at each pixel and determine which colour it
>>was closest and then rank the colours in order of frequency. Whether
>>that would help or not, I don't know.
>>
>
>
> You could do this process with GD, but it'd be incredibly slow, as
> you'd basically have to call imagecolorat() for every pixel. For a
> typical image, e.g. 400 x 300, that's 120,000 pixels. 120,000 API
> calls (and the associated data processing) in PHP is *not* going to be
> fast.
>
> This is the sort of signal processing is the sort of thing that you'd
> really need to write in a fast, compiled language, and make an external
> call to from PHP.
>

[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

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