Minifrontpage: default thumbnail PNG goes wrong

Hello,

When the default thumbnail is of type : PNG, it is rescales as a JPG.
Thus the transparacy is gone.
I have changed some code to solve that in: MinifrontpageHelper.php

if($orig_image == ""){
$size_multiplier = 3; // to generate retina quality of thumbnail
$custom_default_thumb = str_replace('%20', ' ', $custom_default_thumb); // Replace %20 character for image's name with space
//pch 24/4/20 added code
$file_ext = JFile::getExt($custom_default_thumb);
if($file_ext == 'png'){
$imagetype = IMAGETYPE_PNG;
$quality = '7';
$file_ext = 'png';
}elseif($file_ext == 'gif'){
$imagetype = IMAGETYPE_PNG;
$quality = '7';
$file_ext = 'png';
} else {
$imagetype = IMAGETYPE_JPEG;
$quality = '70';
$file_ext = 'jpg';
}
// $file_ext = 'jpg';
// $quality = '70';
//end added code
if($custom_default_thumb){
$default_thumb = $custom_default_thumb;

Regards,

Peter
Resolved
The discussion has been resolved.
       
  • Replied by admin on Friday, April 24 2020, 12:52 PM · Hide· #1
    Ah ok. Thanks for the code peter. I'll implement the fix to the upcoming update
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by phulst on Sunday, July 26 2020, 08:37 PM · Hide· #2
    Hello,

    This error is still not fixed in the recent update 3.0.2.
    When will this be fixed???

    Regards,
    Peter
  •  
  • Replied by admin on Monday, July 27 2020, 12:11 AM · Hide· #3
    Errr .. sorry we missed it. We created a TODO item for fix default.png actually but forgot to associate the issue with this post, so we skipped it because of no clue. We'll definitely include it in the next update. Thanks
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  •  
    Replied by phulst on Monday, July 27 2020, 08:56 PM · Hide· #4
    O that is a pitty! I have already modified to code myself. I hope it will finally be in the next update.
Your Response
Please login first in order for you to submit comments