how to resize image?

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
kevin7
Forum Commoner
Posts: 96
Joined: Fri May 21, 2004 6:54 am

how to resize image?

Post by kevin7 »

actually, i want to make a source code that resize my image...

image will resize into two diff size...
one is 100x80 thumbnail...
and another is 200x160...

can u show me the code..?
evanz
Forum Newbie
Posts: 6
Joined: Wed May 19, 2004 8:44 am

Post by evanz »

echo '<img src="imgname.gif" width="100" height="80">';

echo '<img src="imgname.gif" width="200" height="160">';
kevin7
Forum Commoner
Posts: 96
Joined: Fri May 21, 2004 6:54 am

Post by kevin7 »

no... i mean in php...
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Search the forums!

Especially check out the code snippets forum. Been asked, and answered loadsa times before.

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

Post by pickle »

You're looking for [php_man]imagecopyresampled[/php_man] ideally, or [php_man]imagecopyresized[/php_man] if the other one isn't supported in your version of PHP.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply