Opened 14 years ago

Closed 13 years ago

#5529 closed Bug (fixed)

CKFinder loose png transparency on thumbnails (PHP)

Reported by: Benoît Geeraerts Owned by:
Priority: Normal Milestone:
Component: Server : PHP Version:
Keywords: Cc:


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.

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);



Change History (2)

comment:1 Changed 14 years ago by Benoît Geeraerts

Looks like my fix does not work properly, sorry.

May be related to the $quality test on fastImageCopyResampled function.

Here is the buy button so you can test.

comment:2 Changed 13 years ago by Wiktor Walc

Resolution: fixed
Status: newclosed

Fixed in 2.0.2. Thanks for reporting it.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy