Every php programmer/developer have to resize images in web pages.
There are a lot of ways available through JavaScript, jQuery and PHP.
Here is very simple way to resize image temporarily but proportionally.
You can still keep big image file in you in your folder but when you are displaying you can make is smaller.
Jquery and java script some times does not work. So PHP way is very useful.
($inputwidth/$inputheight)) {
$outputwidth = $inputwidth;
$outputheight = ($inputwidth * $height)/ $width;
}
elseif (($width/$height) < ($inputwidth/$inputheight)) {
$outputwidth = ($inputheight * $width)/ $height;
$outputheight = $inputheight;
}
elseif (($width/$height) == ($inputwidth/$inputheight)) {
$outputwidth = $inputwidth;
$outputheight = $inputheight;
}
echo '';
?>
Howdy very cool website!! Guy .. Beautiful .. Amazing .
. I will bookmark your blog and take the feeds additionally?
I am satisfied to seek out a lot of helpful info right here in the publish, we
need work out extra techniques on this regard, thank you
for sharing. . . . . .