[TYPO3-core] RFC #14602: feature: PNG with alpha transparency

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jul 26 09:03:28 CEST 2010


Hi Jigal,

the patch 14602.patch (from the bug tracker) seems to work for your
example. You forgot to attach it here. But then the issue #14602 is
about something different (merging two PNGs with alpha transparency
looses the transparency in the resulting image, as far as I could
understand).

The original patch patch_truecolor_png_alpha_transparency.diff (not
unified but still I could find the spot to apply it in 4.3) does not
apply in 4.4 anymore, because $this->createImage() was deprecated and we
now have imagecreatetruecolor() calls everywhere (so no central place
where we could add these methods).

Also I wasn't really able to reproduce the original authors scenario. It
would have been easier if the "steps to reproduce" include both image
files so that we can test it without having to find /create a correct
set of images.

Jigal, are you able to find an example of what the original author
intended to see if it works with your patch?

Cheers,
Ernesto

Jigal van Hemert schrieb am 25.07.2010 23:54:
> Hi,
> 
> This is a SVN patch request.
> 
> Type: Feature
> 
> BT reference: http://bugs.typo3.org/view.php?id=14602
> 
> Branches: trunk
> 
> Problem:
> It's not possible to make GIFBUILDER images with a PNG alphachannel
> 
> Solution:
> Add an option to create images with transparency.
> 
> How to test:
> Make sure that the following conditions are met:
> - TS: transparentBackground = 0
> - TS: transparentColor is not set
> - TS: reduceColors is not set
> - Install tool: ['GFX']['png_truecolor'] = 1
> 
> Create a GIFBUILDER image with transparency:
> 10 = IMAGE
> 10 {
>     wrap = <div style="background: #ddd;"> | </div>
>     file = GIFBUILDER
>     file {
>         XY = 100,99
>         format = png
>         alphaChannel = 1
>         5 = BOX
>         5 {
>             dimensions = 50,10,50,50
>             color = yellow
>             opacity = 20
>         }
>         10 = TEXT
>         10 {
>             text = TESTimg
>             fontSize = 24
>             offset = 10,40
>             fontColor = red
>         }
>     }
> }
> 
> This creates an image with transparent background, a semi-transparent
> yellow box and on top red text. The grey CSS background of the div shows
> the transparency of the PNG image.
> 


More information about the TYPO3-team-core mailing list