Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

file Thumbnail quality

More
11 years 8 months ago #798 by gega23
Thumbnail quality was created by gega23
Hello,

i'm using Joomla1.7, and i was looking where i can change the created thumbnail quality, but i didn't find it. I was looking in all of the php files, but no luck.
You know maybe where i can change the quality of the created thumbnails? ;-)

Thanks, G.

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

More
11 years 8 months ago #803 by admin
Replied by admin on topic Re: Thumbnail quality
Hello,
the image quality of the thumbnails is 75, the default for the imagejpeg PHP function (in case of jpg pictures).
In order to change the image quality of the thumbnails, you need to modify the imagejpeg and imagepng functions found in image.php. imagepng uses image compression from 0 to 9 as image quality.
From the php documentation:
bool imagejpeg ( resource $image [, string $filename [, int $quality ]] )
bool imagepng ( resource $image [, string $filename [, int $quality [, int $filters ]]] )
I will probably add these options in a future update.

Olivier.
The following user(s) said Thank You: gega23

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

More
11 years 8 months ago #806 by gega23
Replied by gega23 on topic Re: Thumbnail quality
Hello,

thanks for the quick response. I already solved the problem with your help. :-)
When somebody needs it: in the image.php i changed the line 249:
case 'jpg': case 'jpeg': imagejpeg($this->thumb, $filename); break;
to this:
case 'jpg': case 'jpeg': imagejpeg($this->thumb, $filename, 100); break;

And it worked. Thanks!

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

More
11 years 8 months ago #807 by admin
Replied by admin on topic Re: Thumbnail quality
Great that you fixed this to your liking. I will definitely add thumbnail quality options to my extensions.

Olivier.

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