﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5529	CKFinder loose png transparency on thumbnails (PHP)	Benoît Geeraerts		"I don't know if it's clear enough on the screenshot but the ""buy"" button (3rd image) should have transparent rounded borders but they appear black. This is caused by imagecopyresampled not keeping trancparency on png.

[[Image(http://img638.imageshack.us/img638/2710/screenshot20100413at132.png)]]

Here is a fix for this : in CommandHandler/Thumbnails.php

add this code after the line 
{{{ 
$oThumbImage = imagecreatetruecolor($oSize[""Width""], $oSize[""Height""]); 
}}} 
(line 237)

{{{ 
if($sourceImageAttr['mime'] == 'image/png'){
imagecolortransparent($oThumbImage, imagecolorallocate($oThumbImage, 0, 0, 0));
imagealphablending($oThumbImage, false);
imagesavealpha($oThumbImage, true);
} 
}}}

Regards,

Ben."	Bug	closed	Normal		Server : PHP		fixed		
