Project

General

Profile

Actions

Bug #22797

closed

alpha transparency issue with png_truecolor=1

Added by Andreas Philippi almost 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

trying to create a GIFBUILDER object that overlays 2 png24-images.

the resulting image had no alpha-transparency.

This only happens when setting [GFX][png_truecolor] = 1

Our solution was to replace line 3022 in the file t3lib/class.t3lib_stdgraphic.php as follows:

original:
return imagecreatetruecolor($w, $h);

new:
$tmpImg = imagecreatetruecolor($w, $h);
imagealphablending( $tmpImg, false );
imagesavealpha( $tmpImg, true );
return $tmpImg;

And now it works fine. Patch is attached

typo3 configs

  • [GFX][gdlib_png] = 1
  • [GFX][png_truecolor] = 1
  • [GFX][gdlib-2] = 1

excerpt from our typoscript

temp.our_image = IMAGE
temp.our_image.file = GIFBUILDER
temp.our_image.file{
XY = 243,171
transparentBackground = 1

10 = IMAGE
10.file = fileadmin/template/main/pics/img_border.png
10.file.width = 243
10.file.height = 171

20 = IMAGE
20.file.import.field = image
20.file.import = uploads/pics/
20.file.import.listNum = 0
20.file.width = 217c
20.file.height = 150
20.offset = 10,7
(issue imported from #M14602)


Files

patch_truecolor_png_alpha_transparency.diff (359 Bytes) patch_truecolor_png_alpha_transparency.diff Administrator Admin, 2010-06-03 11:55
14602.patch (1.3 KB) 14602.patch Administrator Admin, 2010-07-25 23:27

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #28405: Enable GIFBUILDER to generate 32-bit PNG imagesClosed2011-07-23

Actions
Actions

Also available in: Atom PDF