note 55147 deleted from function.getimagesize by vincent

From: Date: Tue, 26 Jul 2005 16:31:00 +0000
Subject: note 55147 deleted from function.getimagesize by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92491@lists.php.net to get a copy of this message
Note Submitter: Reason: spam ---- well I liked the below code <?php $image = "absolute/path/to/image/image.jpg"; $size = getimagesize("$image"); $height = $size[1]; $width = $size[0]; if ($height > 150) { $height = 150; $percent = ($size[1] / $height); $width = ($size[0] / $percent); } else if ($width > 150) { $width = 150; $percent = ($size[0] / $width); $height = ($size[1] / $percent); } echo "<img src\"image/path/image.jpg\" height=\"$height\" width=\"$width\" />"; ?> from: http://www.throughhosting.com web hosting - cheap web hosting

« previous php.notes (#92491) next »