Navigation :
HomeSource code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links
Site Sponsors :
Bookmark :
Links :
wwwstoresprogrammershelp
gambling sites
Downloads :
Misc :
Webmaster ResourcesOnly PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming
Image resizer
A resizing example that keeps the aspect ratio of the image intact. the ratio is passed to the script and then the length and width are divided by that.
<?php
header("Content-type: image/jpeg");
//get the scale setting
$scale = $HTTP_GET_VARS['scale'];
//our test image
$img = "test.jpg";
$input_image = ImageCreateFromJPEG("$img");
//scale the image
$image_width = ImageSX($input_image) / $scale;
$image_height = ImageSY($input_image) / $scale;
//create new image
$output_image = ImageCreate($image_width, $image_height);
//resize new image
ImageCopyResized($output_image, $input_image, 0, 0, 0, 0, $image_width, $image_height, ImageSX($input_image), ImageSY($input_image));
//output image
ImageJPEG($output_image);
//clean up
ImageDestroy($input_image);
ImageDestroy($output_image);
?>
Books :
Sponsors :
Random Code :
generate a random password example(randomizing)image verification example(image)
Status code of a web pagewith PHP and cURL(internet)
Random Article :
PHP EncryptionNetwork:
Programming resourcesTutorials directory
Clickbank mall
sell software
Free auctions, low cost stores
UK products
US products
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
DVD site
Domain names
Dating site
Software directory
Maxi directory
bigarticle : free articles
Del.icio.us
Digg
Furl
Newsvine
Netscape
Reddit
StumbleUpon
Technorati
Squidoo
Windows Live
Yahoo MyWeb
Ask
Google