[Typo3-dev] gifbuilder quality, imagecreate()
Martin Kutschker
martin.kutschker at no5pam.blackbox.net
Thu Apr 7 15:36:16 CEST 2005
"Martin Kutschker" <martin.kutscher at no5pam.blackbox.net> schrieb im
Newsbeitrag news:mailman.1.1112876629.7023.typo3-dev at lists.netfielders.de...
>
> "Michael Stucki" <michael at typo3.org> schrieb im Newsbeitrag
> news:mailman.1.1112873317.777.typo3-dev at lists.netfielders.de...
>> Hi Masi,
>>
>>> But the patch is now bitrotten anyway and I noticed that
>>> imagecreatetruecolor() is called without any check for GD2 (via
>>> $this->GD2).
>>>
>>> Any chance this gets into 3.8 if the patch gets some polish? Don't want
>>> to break the GIFBUILDER, but reduced colors look sub-optimal if you use
>>> high
>>> quality JPEGs for fancy/stylish menus.
>>
>> Can you send me a patch until Sunday and CC it to Kasper?
>
> Hm, I'm trying to understand how to determine whether we want to reduce
> colors or not.
>
> If we have GD2 and the output is JPEG or PNG we shouldn't reduce colours.
> OTOH if we have GD1 or create GIFs we need to reduce colour. GD2 usage is
> known from the config. But how about the output format?
>
> The original patch just changed all reduce colour values from 256 to
> 65536. I fear that calls for troubles when we DO want a GIF.
I resolved to check for $conf['format'].
Another issue is in tslib_cObj->getImgResource():
The mask extension is initialized as PNG, unless GFX[im_mask_temp_ext_gif]
is set. But why?
There is also GFX[im_mask_temp_ext_noloss] which is only used for
$tempScale['m_bgImg']. Shouldn't it be used for all temporary mask files?
Masi
More information about the TYPO3-dev
mailing list