- Posts: 2
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
- 24aed296aa9c6ccc4a3d8539
-
Topic Author
- Banned
-
Less
More
IP: 87.97.8.200
14 years 3 months ago #798
by 24aed296aa9c6ccc4a3d8539
Thumbnail quality was created 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.
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.
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 207.229.131.129
14 years 3 months ago #803
by admin
Olivier.
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.
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
- 24aed296aa9c6ccc4a3d8539
-
Topic Author
- Banned
-
Less
More
- Posts: 2
IP: 81.0.84.107
14 years 3 months ago #806
by 24aed296aa9c6ccc4a3d8539
Replied by 24aed296aa9c6ccc4a3d8539 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:
to this:
And it worked. Thanks!
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;
Code:
case 'jpg': case 'jpeg': imagejpeg($this->thumb, $filename, 100); break;
And it worked. Thanks!
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 207.229.131.129
14 years 3 months ago #807
by admin
Olivier.
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.
