PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
social_experiment
DevNet Master
Posts: 2793 Joined: Sun Feb 15, 2009 11:08 am
Location: .za
Post
by social_experiment » Fri Apr 30, 2010 4:56 am
prionkor wrote: How can i improve the quality of the thumbnail image?
'imagejpeg()' accepts an optional argument for quality. The default is 75. Try the following :
Code: Select all
<?php
imagejpeg( $tmp_img, "admin/images/uploads/thumbs/image_001.jpg", 100 ); ?>
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
pickle
Briney Mod
Posts: 6445 Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:
Post
by pickle » Fri Apr 30, 2010 9:47 am
Also, use
imagecopyresampled() instead of
imagecopyresized() .
imagecopyresized() doesn't interpolate, which results in stark colour changes.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
pickle
Briney Mod
Posts: 6445 Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:
Post
by pickle » Fri Apr 30, 2010 10:37 am
Which one are you considering to be "first"?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.