Reply to Re: How to grayscale a gif using bit-swapping

Your name:

Reply:


Posted by Lars Erik Bryld on 03/23/07 18:39

Scripsit Kimmo Laine:

>> $l = (1 << (ord($header[10]) & 7) + 1);
>
> Have you tested that this actually gives the correct value? Just
> that it looks a bit.. hmm.. error-bound? :) Although it does seem
> to be the same as the original...

Tested it, at it seems to work. Most GIFS produce the value 256, and a
B/W GIF produces 2 as it should.

> If the goal here is to write the same value three times (for r,g,b)
> you want str_repeat(chr($gray),3). 3*chr($gray) will give you
> unexpected results.


Tried yoru suggestion, but same result, alas.

>> $rest = fread($fi, 99999999999999999999);
>> fwrite($fo, $rest);
>>
>> fclose($fi);
>> fclose($fo);

This is what I suspect is not doing what I thought it would.


--
Med venlig hilsen
Lars Erik Bryld

[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

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