Reply to Re: [PHP] imagecopyresized just copies

Your name:

Reply:


Posted by Curt Zirzow on 09/30/13 11:32

On Sun, Nov 20, 2005 at 05:14:08PM +0100, Andy Pieters wrote:
> Hi all
>
> I wanted to make a simple script to make a resized image from an uploaded one.
>
> I used the example found on the php.net website
>
> ...
> {imagecopyresized($thumb,$main,0,0,0,0,$newwidth,$newheight,$width,
> $height);
> switch($type)
> case 2: imagejpeg($main,$thumbname);
> ...
> When I examine the two files, the are binary different but size and width are
> equal.

You are re-saving the original file, not the thumb. I think you
really wanted:

imagejpeg($thumb,$thumbname);


btw, it would help to make the code more readable if you removed
all those leading tabs when posting it to the list.

Curt.
--
cat .signature: No such file or directory

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация