MyBBHacks.com Plugins for  MyBB

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Medium-Size Image Quality / Scaling Issues
#2
We use MyBB's generate thumbnail function currently. The default quality is at 75,%

Found in
inc\functions_image.php(21): function generate_thumbnail($file, $path, $filename, $maxheight, $maxwidth)
Code:
        switch($imgtype)
        {
            case 1:
                if(function_exists("imagegif"))
                {
                    @imagegif($thumbim, $path."/".$filename);
                }
                else
                {
                    @imagejpeg($thumbim, $path."/".$filename);
                }
                break;
            case 2:
                @imagejpeg($thumbim, $path."/".$filename);
                break;
            case 3:
                @imagepng($thumbim, $path."/".$filename);
                break;
        }

You would need to change imagejpeg($thumbim, $path."/".$filename);
To
imagejpeg($thumbim, $path."/".$filename,100);

100 keeps it the original quality
Like what I do? Support me at https://www.patreon.com/vbgamer45/
Reply


Messages In This Thread
RE: Medium-Size Image Quality / Scaling Issues - by MyBBHacks - 02-15-2021, 07:14 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)