Project

General

Profile

Actions

Bug #15719

closed

GIFBUILDER inverts transparency under certain conditions

Added by J¶rg Wagner over 18 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2006-02-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Server Config:
WinXP SP2, Apache2.0.48, PHP4.4.0, GraphicsMagick 1.1.7-Q8

Problem also reported in typo3.dev list on 2006.02.18.
Bernhard Kraft reports in that thread that this problem does not take place in his testing environment, but it does on mine and obviously on systems used by other users in the above list thread (Christopher, using Fedora Core).

Problem:
The TS listed below produces correct GIF transparency for the first GIFBUILDER object, but inverted transparency for the second one (see attached FE screendump, top row).
The only difference between the two GIFBUILDER objects is the background color. More testing reveals that the transparency flip happens as soon as backColor becomes numerically bigger than fontColor (if both are read as one 48bit number). So it happens from the moment you set backcolor to at least #808081 in this example. The problem occurs with GIF and with PNG output (setting $TYPO3_CONF_VARS['GFX']['gdlib_png'] = '1').
With PNG instead of GIF output the additional effect is that when the above color condition is met, the transparency is completely lost (see attached FE screendump, middle row)!

Suprisingly switching niceText off ELMINATES the bug! So it seems to be somehow connected to the nicetext image calculation (see attached FE screendump, lower row)!


page.100 = IMAGE
page.100.file = GIFBUILDER
page.100.file {
XY = 200,200
backColor = #000000
transparentBackground = 1
10 = TEXT
10.text = Hello
10.fontColor = #808080
10.fontSize = 80
10.offset = 25,125
10.niceText = 1
10.fontFile = fileadmin/fonts/ARIALN.TTF
}
page.110 = IMAGE
page.110.file = GIFBUILDER
page.110.file {
XY = 200,200
backColor = #FFFFFF
transparentBackground = 1
10 = TEXT
10.text = Hello
10.fontColor = #808080
10.fontSize = 80
10.offset = 25,125
10.niceText = 1
10.fontFile = fileadmin/fonts/ARIALN.TTF
}

(issue imported from #M2692)


Files

GIFBUILDER_Transparency_Bug.jpg (60.3 KB) GIFBUILDER_Transparency_Bug.jpg Administrator Admin, 2006-02-24 16:26
gifbuilder_transparency_2006-03-09.diff (2.76 KB) gifbuilder_transparency_2006-03-09.diff Administrator Admin, 2006-03-09 03:46
gifbuilder_transparency_2006-03-10.diff (3.35 KB) gifbuilder_transparency_2006-03-10.diff Administrator Admin, 2006-03-10 02:00
class.t3lib_stdgraphic.php (2.51 KB) class.t3lib_stdgraphic.php Administrator Admin, 2006-03-22 02:12
class.tslib_gifbuilder.php (648 Bytes) class.tslib_gifbuilder.php Administrator Admin, 2006-03-22 02:12

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #15726: No 100% transparency/opacity with file.maskClosedBernhard Kraft2006-02-27

Actions
Actions

Also available in: Atom PDF