Image Scaling with GD

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
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Image Scaling with GD

Post by omniuni »

Hello everyone!

Can anyone tell me how to tell GD to scale bicubically? I have a thumbnailing script that currently scales with the default and it doesn't always look that great, particularly with thinner lines.

Thanks,
OmniUni
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Image Scaling with GD

Post by pickle »

There is no "default" - there is imagecopyresized() and imagecopyresampled(). imagecopyresampled() will generate a much nicer looking thumbnail.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Image Scaling with GD

Post by omniuni »

awesome! I knew I was missing something!

Thanks again, Pickle!
Post Reply