note 50996 added to function.getimagesize

From: Date: Wed, 16 Mar 2005 05:51:54 +0000
Subject: note 50996 added to function.getimagesize
Groups: php.notes 
Request: Send a blank email to php-notes+get-86523@lists.php.net to get a copy of this message
Heres a easy way to scale images to the <td> that they are in *this is broken up so anyone can understand it :) <? $imageinfo = getimagesize("images/picture.jpg"); $ix=$imageinfo[0]; $iy=$imageinfo[1]; $widthscale = $ix/175; //<TD> WIDTH $heightscale = $iy/175; //<TD> HEIGHT if($widthscale < 1) $nwidth = $ix*$widthscale; else $nwidth = $ix/$widthscale; if($heightscale < 1) $nheight = $iy*$heightscale; else $nheight = $iy/$heightscale; ?> ---- Manual Page -- http://www.php.net/manual/en/function.getimagesize.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50996 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50996&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50996&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50996&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50996&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50996&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50996&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86523) next »