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
4 years 7 months ago #1 by Peter

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5261) Offline
Ah ok. Thanks for the code peter. I'll implement the fix to the upcoming update
4 years 7 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Hello,

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

Regards,
Peter
4 years 4 months ago #3 by Peter

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5261) Offline
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
4 years 4 months ago #4 by TemplatePlazza

Please Log in or Create an account to join the conversation.

O that is a pitty! I have already modified to code myself. I hope it will finally be in the next update.
4 years 4 months ago #5 by Peter

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5261) Offline
Hi peter, just want to let you know that we have uploaded the new version and the fix already included. Please try it ;)
4 years 3 months ago #6 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum