Thumbnails image quality
Thumbnails image qualityHello,
What can I do, if the generated thumbnails are too much compressed – they look quite pixelated? The size of the images, I've uploaded ist 533 x 800px and the thumbnails are 150 x 226px. Is there any possibility to control the compression? The original pictures are web saved with 80% quality and look excellent, but maybe this is the problem here? Thank you for any answers:) petersilie
Re: Thumbnails image qualityWhen thumbnails are created we didn't set any Quality parameter, so it defaults, as written on http://php.net/manual/en/function.imagejpeg.php, to 75% in case of jpeg images.
There is 3 different cases when creating a thumbnail, for JPEG, PNG and GIF. In case of JPEG we use imagejpeg(), JPG is a lossy compression and default quality is 75%. You can change this in : [JoomlaRoot]\plugins\content\admirorgallery\admirorgallery\classes\agHelper.php:line 398 Code: Select all Code: Select all Just be sure to remove the previous generated thumbnails after you make change in quality value. Because thumbnails are recreated only in case dimensions of thumbnails are changed. Thumbnails are created in [JoomlaRoot]\plugins\content\admirorgallery\admirorgallery\thumbs. In case of PNG we use imagepng(), and the default compression rate is 6. Different than JPEG, for PNG 0 is no compression (biggest file and best) and 9 is most compressed. But this doesn't affect the image quality because PNG is a lossless image format. Same as for JPEG you can change the parameters in the function, but it will not produce better images. In case of GIF we use imagegif(), this is also a lossless compression so quality cannot be changed. And the function dose not have an option to set quality. Considering the above, you probably use JPEG images so you can try as I suggested for JPEG images. Help Admiror Gallery become even better,
give us a review on JED |
