Thumbs have minor artifacts...

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

Post Reply
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Thumbs have minor artifacts...

Post by seodevhead »

Hey guys, I'm using a script from a book to do auto-thumbnail creation and it works great on my server. However I am a little dissapointed that the quality of the thumbnails is not very high as I can see some grey artifacting around the main images (in the whitespace around logos, etc). What can I do to turn up the quality setting for thumbnailing? I am afraid I can't post the code from the book because I don't want to do anything against the copyright stuff. Thanks!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Sounds like it was written for an older version of GD. Change imagecopyresized() to imagecopyresampled()

Otherwise, I think we'll need to see the code.
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Hey feyd,

I just checked the code and it uses the imagecopyresampled() function. I think I fixed it, as I am testing it now and so far everything looks better. I found the imagejpeg() function and added the "quality" (1-100) rating as the third parameter and it looks a lot better. I think it was defaulting to the default quality 75. Thanks for the help!
Post Reply