Navigation :
HomeSource code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links
Site Sponsors :
- Load Cells
- mothers day replica rolex watches today
- Free partition data recovery utilities
- cheap reseller hosting
- MySQL & Best PHP Web Hosting + save 50%
Bookmark :
Links :
domain namesgolfing products
dvd information
Downloads :
Misc :
Webmaster ResourcesOnly PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming
Better image resizing function
This function allows you to input your image , the percentage you wish the width to be displayed at and the percentage you wish the height to be displayed at
imageresize.php code
<?php
function ResizeImage($image ,$width ,$height)
{
//image resizer by myscripting
//get the size of the original
$size = GetImageSize($image);
//divide the width / height percentage by 100
$new_width = 100 / $width;
$new_height = 100 / $height;
//store the resized dimensions in a variable
$sizeh = $size[1]/ $new_height;
$sizew= $size[0]/ $new_width;
//display the new resized image
$new_image = "<img src = \"$image\" height=\"$sizeh\" width =\"$sizew\">";
echo $new_image;
}
?>
Here is how we call this script with some examples .
<?php
require("imageresize.php");
//this reduces the image
ResizeImage("1.gif",50,50);
echo "<br>";
//we can increase an image as well
ResizeImage("1.gif",150,150);
?>
Books :
Sponsors :
Random Code :
Page last accessed(date and time)What type of image(image)
Search a text file(string)
Random Article :
PHP Server to Client with No RefreshFor Automated Sites PHP and MySQL are A Perfect Match
Network:
Programming resourcesTutorials directory
Hosting resources
ASP site
Domain names
Progged
Maxi directory
bigarticle : free articles
A Code
Code N Tutorials
Del.icio.us
Digg
Furl
Newsvine
Netscape
Reddit
StumbleUpon
Technorati
Squidoo
Windows Live
Yahoo MyWeb
Ask
Google