Opened 15 years ago
Closed 14 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: |
Description
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); }
Regards,
Ben.
Change History (2)
comment:1 Changed 15 years ago by
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 2.0.2. Thanks for reporting it.
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.