Jump to content

[SOLVED] PHP + GD2 thumbnails, anyway way to maximize the quality?


kritical

Recommended Posts

Hey there  ;D

 

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

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  ;D

 

Cheers

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.