You are here: Re: How to grayscale a gif using bit-swapping « PHP Programming Language « IT news, forums, messages
Re: How to grayscale a gif using bit-swapping

Posted by C. on 03/22/07 14:33

On 21 Mar, 18:27, Lars Erik Bryld <larse...@dadlnet.invalid> wrote:
>
> I am trying to convert a (supposedly) working python script into php.
> The script reads a colour gif-picture and produces a greyscale copy of
> it.
>
<snip>

It would be safer to use GD. There's even an example of how to do this
at http://www.php.net/manual/en/function.imagecolorset.php

(FWIW, both the example above and your own code use an averaging
method to determine the grey scale; while color models vary, it might
be more approriate to measure the size of the orthognal vectors -
(integer)(sqrt($red*$red + $green*$green + $blue*$blue)*0.5769)
)

C.

 

Navigation:

[Reply to this 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

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