[TYPO3-core] Bugfix #760 GIFBUILDER 256 colors

Bernhard Kraft kraftb at kraftb.at
Mon Feb 6 20:58:47 CET 2006


Bernhard Kraft wrote:
> I got a bug report from someone who used my "kb_allcolors" extension 
> that there
> is a problem when "only" one color is used with "transparentColors".
> 
> I can confirm this happens and patched it.


Rico Moorman and I tested the following patch for some time now and we came to the conclusion
that it works better.

The problem was that when you set gdlib_png to 0 all internal images where rendered as .gif thus
resulting in reduced (256) colors.

I now introduced a new variable "[GFX][internal_ext]" which is by default set to png as most GDlib
IM support this and png has truecolor support with lossless compression.

now we fixed a problem converting truecolor to palette based gif's with the
imagetruecolortopalette PHP-GD function.
and replaced the use of $this->gifExtension everwhere applicable.

also the unifyColors method was broken as I already wrote in my last mail.

please review a little bit as I would like to get it into beta3 ! notice that .transparentColor will
be broken otherwise.


greets,
Bernhard



More information about the TYPO3-team-core mailing list