Postings

You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).

Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!

Thumbnail quality

More
IP: 87.97.8.200 14 years 3 months ago #798 by 24aed296aa9c6ccc4a3d8539
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.
More
IP: 207.229.131.129 14 years 3 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: 24aed296aa9c6ccc4a3d8539
More
IP: 81.0.84.107 14 years 3 months ago #806 by 24aed296aa9c6ccc4a3d8539
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:
Code:
case 'jpg': case 'jpeg': imagejpeg($this->thumb, $filename); break;
to this:
Code:
case 'jpg': case 'jpeg': imagejpeg($this->thumb, $filename, 100); break;

And it worked. Thanks!
More
IP: 207.229.131.129 14 years 3 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.