kritical Posted February 1, 2007 Share Posted February 1, 2007 Hey there I'm automatically creating thumbnails using the imagecopyresampled() function from the GD2 library Personally I think the quality is more than sufficient, however the person who is paying me would like higher quality :-\ Does anyone know a way to increase the quality even more? Any help would be greatly appriciated! Cheers! Paul - New Zealand Link to comment https://forums.phpfreaks.com/topic/36601-solved-php-gd2-thumbnails-anyway-way-to-maximize-the-quality/ Share on other sites More sharing options...
hvle Posted February 1, 2007 Share Posted February 1, 2007 imagecopyresampled uses 256 color sample, and that's why the thumbnail looks ugly. You may want to take a look at imagecreatetruecolor. Link to comment https://forums.phpfreaks.com/topic/36601-solved-php-gd2-thumbnails-anyway-way-to-maximize-the-quality/#findComment-174394 Share on other sites More sharing options...
kritical Posted February 2, 2007 Author Share Posted February 2, 2007 I was using imagecreatetruecolor previously, I found out what the issue was (with a lot of googling! =) Turns out imagejpeg() has 3 parameters.. I was only using the first... // Original Line imagejpeg($img); // New line imagejpeg($img, null, 100); That last parameter sets the quality of the jpeg which defaults to around 70-75% After setting it to 100% everything looks much better! Hopefully someone else can use this thread to their advantage Cheers Link to comment https://forums.phpfreaks.com/topic/36601-solved-php-gd2-thumbnails-anyway-way-to-maximize-the-quality/#findComment-175125 Share on other sites More sharing options...
hvle Posted February 2, 2007 Share Posted February 2, 2007 that's awesome, Link to comment https://forums.phpfreaks.com/topic/36601-solved-php-gd2-thumbnails-anyway-way-to-maximize-the-quality/#findComment-175151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.